1
Answer

Printing a ulong value in Binary using Convert.ToString()

Photo of Erik Movsesyan

Erik Movsesyan

3y
1.8k
1

Hello!

I am trying to get the binary of a ulong number but it says that It cannot convert from ulong to bool.

The workaround is casting the ulong to long but,

Why can not it do this if It works fine with uint or long etc...

What does bool have to do here?

 

ulong efvenvjnuskl = 18446744073709551615;
Console.WriteLine(Convert.ToString(efvenvjnuskl,2));

Answers (1)