# GrapeCity.Documents.Common.GcBinaryWriter

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Documents_Common_GcBinaryWriter" data-uid="GrapeCity.Documents.Common.GcBinaryWriter" class="text-break">GcBinaryWriter Class
</h1>
  <div class="markdown level0 summary"><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.binarywriter">BinaryWriter</a> with some additional functionality.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.binarywriter">BinaryWriter</a></div>
    <div class="level2"><span class="xref">GcBinaryWriter</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iasyncdisposable">IAsyncDisposable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.Documents.Common.html">GrapeCity.Documents.Common</a></h6>
  <h6><strong>Assembly</strong>: DS.Documents.Imaging.dll</h6>
  <h5 id="GrapeCity_Documents_Common_GcBinaryWriter_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class GcBinaryWriter : BinaryWriter, IDisposable, IAsyncDisposable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class GcBinaryWriter
    Inherits BinaryWriter
    Implements IDisposable, IAsyncDisposable</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Common_GcBinaryWriter__ctor_System_IO_Stream_System_Text_Encoding_System_Boolean_" data-uid="GrapeCity.Documents.Common.GcBinaryWriter.#ctor(System.IO.Stream,System.Text.Encoding,System.Boolean)">
          <a class="xref" href="GrapeCity.Documents.Common.GcBinaryWriter.-ctor.html#GrapeCity_Documents_Common_GcBinaryWriter__ctor_System_IO_Stream_System_Text_Encoding_System_Boolean_">GcBinaryWriter(Stream, Encoding, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Documents.Common.GcBinaryWriter.html">GcBinaryWriter</a> class.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Common_GcBinaryWriter_Write7BitEncodedInt_System_Int32_" data-uid="GrapeCity.Documents.Common.GcBinaryWriter.Write7BitEncodedInt(System.Int32)">
          <a class="xref" href="GrapeCity.Documents.Common.GcBinaryWriter.Write7BitEncodedInt.html#GrapeCity_Documents_Common_GcBinaryWriter_Write7BitEncodedInt_System_Int32_">Write7BitEncodedInt(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Writes 32 int in compressed form.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Common_GcBinaryWriter_WriteEnum__1___0_" data-uid="GrapeCity.Documents.Common.GcBinaryWriter.WriteEnum``1(``0)">
          <a class="xref" href="GrapeCity.Documents.Common.GcBinaryWriter.WriteEnum.html#GrapeCity_Documents_Common_GcBinaryWriter_WriteEnum__1___0_">WriteEnum&lt;T&gt;(T)</a>
        </td>
        <td class="markdown level1 summary"><p>Writes enum value.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Common_GcBinaryWriter_WriteNullableEnum__1_System_Nullable___0__" data-uid="GrapeCity.Documents.Common.GcBinaryWriter.WriteNullableEnum``1(System.Nullable{``0})">
          <a class="xref" href="GrapeCity.Documents.Common.GcBinaryWriter.WriteNullableEnum.html#GrapeCity_Documents_Common_GcBinaryWriter_WriteNullableEnum__1_System_Nullable___0__">WriteNullableEnum&lt;T&gt;(T?)</a>
        </td>
        <td class="markdown level1 summary"><p>Writes nullable enum value.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Common_GcBinaryWriter_WriteNullableInt_System_Nullable_System_Int32__" data-uid="GrapeCity.Documents.Common.GcBinaryWriter.WriteNullableInt(System.Nullable{System.Int32})">
          <a class="xref" href="GrapeCity.Documents.Common.GcBinaryWriter.WriteNullableInt.html#GrapeCity_Documents_Common_GcBinaryWriter_WriteNullableInt_System_Nullable_System_Int32__">WriteNullableInt(int?)</a>
        </td>
        <td class="markdown level1 summary"><p>Writes nullable int.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Common_GcBinaryWriter_WriteNullableString_System_String_" data-uid="GrapeCity.Documents.Common.GcBinaryWriter.WriteNullableString(System.String)">
          <a class="xref" href="GrapeCity.Documents.Common.GcBinaryWriter.WriteNullableString.html#GrapeCity_Documents_Common_GcBinaryWriter_WriteNullableString_System_String_">WriteNullableString(string)</a>
        </td>
        <td class="markdown level1 summary"><p>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.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
