# GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcTextBox.GetLineText

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_GcTextBox_GetLineText_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcTextBox.GetLineText*">GetLineText Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_GcTextBox_GetLineText_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcTextBox.GetLineText*"></a>
<h4 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_GcTextBox_GetLineText_System_Int32_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcTextBox.GetLineText(System.Int32)">GetLineText(int)</h4>
<div class="markdown level1 summary"><p>Returns the text that is currently displayed on the specified line.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public string GetLineText(int lineIndex)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetLineText(lineIndex As Integer) As String</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">lineIndex</span></td>
      <td><p>The zero-based line index for which to retrieve the currently displayed text.</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.string">string</a></td>
      <td><p>A string containing a copy of the text currently visible on the specified line.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>If <code class="paramref">lineIndex</code> is less than 0 or is greater than or equals to line count.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
