I would like a help to convert the following code in Java to C #.
public static long convertStringToBitboard(String Binary)
{
if (Binary.charAt(0)=='0')
{
return Long.parseLong(Binary, 2);
} else
{
return Long.parseLong("1"+Binary.substring(2), 2)*2;
}
}
I tried to use tools that perform machine translation, but I did not succeed. Searching for Google also failed to do.
The real question is the lines
return Long.parseLong(Binary, 2);
return Long.parseLong("1"+Binary.substring(2), 2)*2;
I'm waiting for some help. I have already given up hope of making this work in C #, I hope you can do it with your help:)
Thank you in advance.