[]
The System.IO.BinaryWriter with some additional functionality.
public class GcBinaryWriter : BinaryWriter, IDisposable
Initializes a new instance of the GcBinaryWriter class.
public GcBinaryWriter(Stream baseStream, Encoding encoding, bool leaveOpen)
baseStream System.IO.StreamThe underlying System.IO.Stream object.
encoding System.Text.EncodingThe encoding used for strings.
leaveOpen booltrue to leave the stream open after the GcBinaryWriter object is disposed; otherwise, false.
Writes 32 int in compressed form.
public void Write7BitEncodedInt(int value)
value intWrites enum value.
public void WriteEnum<T>(T value) where T : struct
value TTWrites nullable enum value.
public void WriteNullableEnum<T>(T? value) where T : struct
value T?TWrites nullable int.
public void WriteNullableInt(int? value)
value int?Writes a length-prefixed string to this stream in the current encoding of the BinaryWriter, and advances the current position of the stream in accordance with the encoding used and the specific characters being written to the stream. -1 is used to indicate null string.
public void WriteNullableString(string value)
value string