Francois Beaussier & Aymeric Gaurat Apelli

Monday

Binary numbers...

I just came accross some c# code wich was used to convert a number into it's binary representation. It did work but there is already something much simpler in the framework that does exactly the same thing:

Console.WriteLine(">> " + Convert.ToString(12345, 2));

>> 11000000111001

Instead of base 2, you may as well put 8, 10 or 16, which might be handy :)

0 Comments:

Post a Comment

<< Home