Monday, August 1, 2011

Convert Integers to Binary, Octal or Hexadecimal

Console.WriteLine(Convert.ToString(value, 2));      // Outputs "10101010"
Console.WriteLine(Convert.ToString(value, 8));      // Outputs "271"
Console.WriteLine(Convert.ToString(value, 16));     // Outputs "b9"

Compiled By: Rajesh Rolen

Share This!


No comments:

Powered By Blogger · Designed By Seo Blogger Templates