I want to display one byte in textbox. Now I\'m using:
Convert.ToString(MyVeryOwnByte, 2);
But when byte is has 0\'s at begining those 0\'s
You can create an extension method:
public static class ByteExtension { public static string ToBitsString(this byte value) { return Convert.ToString(value, 2).PadLeft(8, '0'); } }