D
David Hall
byte b = 10;
Console.WriteLine("{0} = 0x{0,2:X}", b);
// This example displays "10 = 0x A". Note the space between 0x and A
// I want it to display as: "10 = 0x0A" Note the zero between 0x and A
// How can I change the format string
// to pad it to 2 digits using a leading 0 if necessary
// instead of a space in the hex representation?
// Dave
Console.WriteLine("{0} = 0x{0,2:X}", b);
// This example displays "10 = 0x A". Note the space between 0x and A
// I want it to display as: "10 = 0x0A" Note the zero between 0x and A
// How can I change the format string
// to pad it to 2 digits using a leading 0 if necessary
// instead of a space in the hex representation?
// Dave