# GrapeCity.Documents.Text.TextRun.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Text_TextRun__ctor_" data-uid="GrapeCity.Documents.Text.TextRun.#ctor*">TextRun Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Text_TextRun__ctor_" data-uid="GrapeCity.Documents.Text.TextRun.#ctor*"></a>
<h4 id="GrapeCity_Documents_Text_TextRun__ctor_System_String_" data-uid="GrapeCity.Documents.Text.TextRun.#ctor(System.String)">TextRun(string)</h4>
<div class="markdown level1 summary"><p>Creates a new instance of <a class="xref" href="GrapeCity.Documents.Text.TextRun.html">TextRun</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TextRun(string text)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(text 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.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>The text of the section.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Text_TextRun__ctor_" data-uid="GrapeCity.Documents.Text.TextRun.#ctor*"></a>
<h4 id="GrapeCity_Documents_Text_TextRun__ctor_System_String_GrapeCity_Documents_Text_TextFormat_" data-uid="GrapeCity.Documents.Text.TextRun.#ctor(System.String,GrapeCity.Documents.Text.TextFormat)">TextRun(string, TextFormat)</h4>
<div class="markdown level1 summary"><p>Creates a new instance of <a class="xref" href="GrapeCity.Documents.Text.TextRun.html">TextRun</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TextRun(string text, TextFormat format)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(text As String, format As TextFormat)</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.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>The text of the section.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Text.TextFormat.html">TextFormat</a></td>
      <td><span class="parametername">format</span></td>
      <td><p>The text format to use.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Text_TextRun__ctor_" data-uid="GrapeCity.Documents.Text.TextRun.#ctor*"></a>
<h4 id="GrapeCity_Documents_Text_TextRun__ctor_System_Int32___System_Int32_System_Int32_" data-uid="GrapeCity.Documents.Text.TextRun.#ctor(System.Int32[],System.Int32,System.Int32)">TextRun(int[], int, int)</h4>
<div class="markdown level1 summary"><p>Creates a new instance of <a class="xref" href="GrapeCity.Documents.Text.TextRun.html">TextRun</a> based on a subrange of an array of UTF-32 characters.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TextRun(int[] codePoints, int startIndex, int count)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(codePoints As Integer(), startIndex As Integer, count As Integer)</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">codePoints</span></td>
      <td><p>An array of UTF-32 characters (code points).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">startIndex</span></td>
      <td><p>Index of the first code point in the subrange.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">count</span></td>
      <td><p>Number of code points in the subrange.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Text_TextRun__ctor_" data-uid="GrapeCity.Documents.Text.TextRun.#ctor*"></a>
<h4 id="GrapeCity_Documents_Text_TextRun__ctor_System_Int32___System_Int32_System_Int32_GrapeCity_Documents_Text_TextFormat_" data-uid="GrapeCity.Documents.Text.TextRun.#ctor(System.Int32[],System.Int32,System.Int32,GrapeCity.Documents.Text.TextFormat)">TextRun(int[], int, int, TextFormat)</h4>
<div class="markdown level1 summary"><p>Creates a new instance of <a class="xref" href="GrapeCity.Documents.Text.TextRun.html">TextRun</a> based on a subrange of an array of UTF-32 characters.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TextRun(int[] codePoints, int startIndex, int count, TextFormat format)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(codePoints As Integer(), startIndex As Integer, count As Integer, format As TextFormat)</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">codePoints</span></td>
      <td><p>An array of UTF-32 characters (code points).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">startIndex</span></td>
      <td><p>Index of the first code point in the subrange.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">count</span></td>
      <td><p>Number of code points in the subrange.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Text.TextFormat.html">TextFormat</a></td>
      <td><span class="parametername">format</span></td>
      <td><p>The text format to use.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
