# C1.WPF.RichTextBox.EditExtensions.Delete

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_RichTextBox_EditExtensions_Delete_" data-uid="C1.WPF.RichTextBox.EditExtensions.Delete*">Delete Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_RichTextBox_EditExtensions_Delete_" data-uid="C1.WPF.RichTextBox.EditExtensions.Delete*"></a>
<h4 id="C1_WPF_RichTextBox_EditExtensions_Delete_C1_WPF_RichTextBox_Documents_C1TextRange_System_Boolean_System_Boolean_" data-uid="C1.WPF.RichTextBox.EditExtensions.Delete(C1.WPF.RichTextBox.Documents.C1TextRange,System.Boolean,System.Boolean)">Delete(C1TextRange, bool, bool)</h4>
<div class="markdown level1 summary"><p>Deletes elements and content in a range.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static C1TextPointer Delete(this C1TextRange range, bool hasSelection = true, bool needDeleteTable = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Delete(range As C1TextRange, Optional hasSelection As Boolean = True, Optional needDeleteTable As Boolean = False) As C1TextPointer</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="C1.WPF.RichTextBox.Documents.C1TextRange.html">C1TextRange</a></td>
      <td><span class="parametername">range</span></td>
      <td><p>A <a class="xref" href="C1.WPF.RichTextBox.Documents.C1TextRange.html">C1TextRange</a> where the content is to be deleted.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">hasSelection</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">needDeleteTable</span></td>
      <td></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="C1.WPF.RichTextBox.Documents.C1TextPointer.html">C1TextPointer</a></td>
      <td><p>A position before the deleted range,</p>
</td>
    </tr>
  </tbody>
</table>
</div>
