public static void WriteBoolean(bool value, Stream stream) { if (stream == null) { throw new ArgumentNullException("stream"); } stream.WriteByte(value ? (byte)0xf5 : (byte)0xf4); }