blog.jj5.net (2003 to 2005)

Using Numeric Format Strings in C# to output bytes with leading Zeros (for ex-VB developers)

Tue Dec 21 17:48:00 UTC+1100 2004

Categories:

If you want your byte to be in hex format and not drop leading zeros, use “X2”.

For example: 0x2.ToString(”X2”)

...or something like that... ;) 


Copyright © 2003-2005 John Elliot