Miscellany
public text v1 · immutable private static string DumpByte(byte b)
{
StringBuilder sb = new StringBuilder();
for (int i = 7; i >= 0; --i) {
int bit = 1 << i;
if ((b & bit) != 0) {
sb.Append("1");
} else {
sb.Append("0");
}
}
return sb.ToString();
}