3
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 through Google also could not do.
The real question is the lines
return Long.parseLong(Binary, 2);
return Long.parseLong("1"+Binary.substring(2), 2)*2;
I look forward to some help. To tell you the truth I’ve given up hope of making it work in C#, I hope you get it with your help :)
Thanks in advance.
I can at least know why I voted against?
– Jéf Bueno
Thank you very much LINQ. I am new here. I am marking the question as solved. Well... it was not I who negative. Again thank you very much.
– João Almeida