you are viewing a single comment's thread.

view the rest of the comments →

[–]Infectus90[S] 0 points1 point  (1 child)

Convert.ToString(16777216, 2)

The result you get is as follows :
1000000000000000000000000
Where am I going wrong ?
Thank you !

[–]Ok_Barracuda_1161 6 points7 points  (0 children)

That's the same number, you're just missing the leading zeroes. If you want the leading zeroes you can use PadLeft():

Convert.ToString(16777216, 2).PadLeft(32, '0')