# C1.DataConnector.C1DataReaderBase.GetChars

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_DataConnector_C1DataReaderBase_GetChars_" data-uid="C1.DataConnector.C1DataReaderBase.GetChars*">GetChars Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_DataConnector_C1DataReaderBase_GetChars_" data-uid="C1.DataConnector.C1DataReaderBase.GetChars*"></a>
<h4 id="C1_DataConnector_C1DataReaderBase_GetChars_System_Int32_System_Int64_System_Char___System_Int32_System_Int32_" data-uid="C1.DataConnector.C1DataReaderBase.GetChars(System.Int32,System.Int64,System.Char[],System.Int32,System.Int32)">GetChars(int, long, char[], int, int)</h4>
<div class="markdown level1 summary"><p>Writes in the passed buffer a number of characters read from within a column.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public override long GetChars(int ordinal, long dataOffset, char[] buffer, int bufferOffset, int length)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overrides Function GetChars(ordinal As Integer, dataOffset As Long, buffer As Char(), bufferOffset As Integer, length As Integer) As Long</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">ordinal</span></td>
      <td><p>The zero-based column ordinal.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a></td>
      <td><span class="parametername">dataOffset</span></td>
      <td><p>The index within the field from which to begin the read operation.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.char">char</a>[]</td>
      <td><span class="parametername">buffer</span></td>
      <td><p>The buffer into which to read the stream of bytes.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">bufferOffset</span></td>
      <td><p>The index within the buffer where the write operation is to start.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">length</span></td>
      <td><p>The maximum length to copy into the buffer.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.data.common.dbdatareader.getchars">DbDataReader.GetChars(int, long, char[], int, int)</a></div>
</div>
