public static void writeBool(bool value, BinaryWriter writer) { byte byteval = value ? (byte)1 : (byte)0; writeByte(byteval,writer); }