Friday, June 03, 2005

How to Convert Integer to Binary

The Convert class has an overload of the static ToString() method that takes two ints and returns a string populated with the number in the specified base. For instance, calling Convert.ToString(128, 2) will return "10000000".

No comments: