A hexadecimal literal must begin with 0x (a zero followed by an x). using System; class MainClass { public static void Main() { Console.WriteLine("{0:X}", 255); Console.WriteLine("{0:x8}", 1456); } }
FF 000005b0