# GrapeCity.Documents.Word.ContentObject

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Documents_Word_ContentObject" data-uid="GrapeCity.Documents.Word.ContentObject" class="text-break">ContentObject Class
</h1>
  <div class="markdown level0 summary"><p>Base class representing a content object in a document.</p>
<p>
Derived classes include <a class="xref" href="GrapeCity.Documents.Word.FormattedContentObject.html">FormattedContentObject</a>, <a class="xref" href="GrapeCity.Documents.Word.ContentMark.html">ContentMark</a>,
<a class="xref" href="GrapeCity.Documents.Word.Text.html">Text</a>, <a class="xref" href="GrapeCity.Documents.Word.UnknownContent.html">UnknownContent</a>, <a class="xref" href="GrapeCity.Documents.Word.CommentInfo.html">CommentInfo</a>, <a class="xref" href="GrapeCity.Documents.Word.SeparatorMark.html">SeparatorMark</a>,
<a class="xref" href="GrapeCity.Documents.Word.ContinuationSeparatorMark.html">ContinuationSeparatorMark</a>, <a class="xref" href="GrapeCity.Documents.Word.Footnote.html">Footnote</a>, <a class="xref" href="GrapeCity.Documents.Word.Endnote.html">Endnote</a>, 
<a class="xref" href="GrapeCity.Documents.Word.EndnoteReferenceMark.html">EndnoteReferenceMark</a>, <a class="xref" href="GrapeCity.Documents.Word.FootnoteReferenceMark.html">FootnoteReferenceMark</a>, <a class="xref" href="GrapeCity.Documents.Word.Hyperlink.html">Hyperlink</a>, 
<a class="xref" href="GrapeCity.Documents.Word.SimpleField.html">SimpleField</a>, <a class="xref" href="GrapeCity.Documents.Word.ControlContent.html">ControlContent</a>, <a class="xref" href="GrapeCity.Documents.Word.SectionBreak.html">SectionBreak</a>, <a class="xref" href="GrapeCity.Documents.Word.ShapeBase.html">ShapeBase</a>, 
<a class="xref" href="GrapeCity.Documents.Word.TextFrame.html">TextFrame</a>, <a class="xref" href="GrapeCity.Documents.Word.LinkedTextFrame.html">LinkedTextFrame</a>, <a class="xref" href="GrapeCity.Documents.Word.OMathParagraph.html">OMathParagraph</a>, <a class="xref" href="GrapeCity.Documents.Word.OMath.html">OMath</a>,
<a class="xref" href="GrapeCity.Documents.Word.OMathStruct.html">OMathStruct</a>, <a class="xref" href="GrapeCity.Documents.Word.OMathElement.html">OMathElement</a>, <a class="xref" href="GrapeCity.Documents.Word.OMathMatrixRow.html">OMathMatrixRow</a>.
</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"><span class="xref">ContentObject</span></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.CommentInfo.html">CommentInfo</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.ContentControl.html">ContentControl</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.ContentMark.html">ContentMark</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.ContinuationSeparatorMark.html">ContinuationSeparatorMark</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.ControlContent.html">ControlContent</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.Endnote.html">Endnote</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.EndnoteReferenceMark.html">EndnoteReferenceMark</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.Footnote.html">Footnote</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.FootnoteReferenceMark.html">FootnoteReferenceMark</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.FormattedContentObject.html">FormattedContentObject</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.Hyperlink.html">Hyperlink</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.LinkedTextFrame.html">LinkedTextFrame</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.OMath.html">OMath</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.OMathElement.html">OMathElement</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.OMathMatrixRow.html">OMathMatrixRow</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.OMathParagraph.html">OMathParagraph</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.OMathStruct.html">OMathStruct</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.SectionBreak.html">SectionBreak</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.SeparatorMark.html">SeparatorMark</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.ShapeBase.html">ShapeBase</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.SimpleField.html">SimpleField</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.Text.html">Text</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.TextFrame.html">TextFrame</a></div>
      <div class="level2"><a class="xref" href="GrapeCity.Documents.Word.UnknownContent.html">UnknownContent</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.Documents.Word.html">GrapeCity.Documents.Word</a></h6>
  <h6><strong>Assembly</strong>: DS.Documents.Word.dll</h6>
  <h5 id="GrapeCity_Documents_Word_ContentObject_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class ContentObject</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class ContentObject</code></pre>
  </div>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Word_ContentObject_Children" data-uid="GrapeCity.Documents.Word.ContentObject.Children">
          <a class="xref" href="GrapeCity.Documents.Word.ContentObject.Children.html#GrapeCity_Documents_Word_ContentObject_Children">Children</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the collection of the children of this content object.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_ContentObject_Document" data-uid="GrapeCity.Documents.Word.ContentObject.Document">
          <a class="xref" href="GrapeCity.Documents.Word.ContentObject.Document.html#GrapeCity_Documents_Word_ContentObject_Document">Document</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the <a class="xref" href="GrapeCity.Documents.Word.DocumentBase.html">DocumentBase</a> that contains this content object.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_ContentObject_End" data-uid="GrapeCity.Documents.Word.ContentObject.End">
          <a class="xref" href="GrapeCity.Documents.Word.ContentObject.End.html#GrapeCity_Documents_Word_ContentObject_End">End</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the <a class="xref" href="GrapeCity.Documents.Word.Marker.html">Marker</a> representing the end of this content object in the parent body.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_ContentObject_Guid" data-uid="GrapeCity.Documents.Word.ContentObject.Guid">
          <a class="xref" href="GrapeCity.Documents.Word.ContentObject.Guid.html#GrapeCity_Documents_Word_ContentObject_Guid">Guid</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the content unique identifier.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_ContentObject_OwnerSection" data-uid="GrapeCity.Documents.Word.ContentObject.OwnerSection">
          <a class="xref" href="GrapeCity.Documents.Word.ContentObject.OwnerSection.html#GrapeCity_Documents_Word_ContentObject_OwnerSection">OwnerSection</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the <a class="xref" href="GrapeCity.Documents.Word.Section.html">Section</a> that owns this content object.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_ContentObject_ParentBody" data-uid="GrapeCity.Documents.Word.ContentObject.ParentBody">
          <a class="xref" href="GrapeCity.Documents.Word.ContentObject.ParentBody.html#GrapeCity_Documents_Word_ContentObject_ParentBody">ParentBody</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the parent <a class="xref" href="GrapeCity.Documents.Word.Body.html">Body</a> of this content object.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_ContentObject_ParentContent" data-uid="GrapeCity.Documents.Word.ContentObject.ParentContent">
          <a class="xref" href="GrapeCity.Documents.Word.ContentObject.ParentContent.html#GrapeCity_Documents_Word_ContentObject_ParentContent">ParentContent</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the parent <a class="xref" href="GrapeCity.Documents.Word.ContentObject.html">ContentObject</a> of this content object.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_ContentObject_Start" data-uid="GrapeCity.Documents.Word.ContentObject.Start">
          <a class="xref" href="GrapeCity.Documents.Word.ContentObject.Start.html#GrapeCity_Documents_Word_ContentObject_Start">Start</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the <a class="xref" href="GrapeCity.Documents.Word.Marker.html">Marker</a> representing the start of this content object in the parent body.</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_Word_ContentObject_CanAdd_System_Type_" data-uid="GrapeCity.Documents.Word.ContentObject.CanAdd(System.Type)">
          <a class="xref" href="GrapeCity.Documents.Word.ContentObject.CanAdd.html#GrapeCity_Documents_Word_ContentObject_CanAdd_System_Type_">CanAdd(Type)</a>
        </td>
        <td class="markdown level1 summary"><p>Checks whether a <a class="xref" href="GrapeCity.Documents.Word.ContentObject.html">ContentObject</a> of the specified type can be added to the current object.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_ContentObject_CanAdd_System_Type_System_Exception__" data-uid="GrapeCity.Documents.Word.ContentObject.CanAdd(System.Type,System.Exception@)">
          <a class="xref" href="GrapeCity.Documents.Word.ContentObject.CanAdd.html#GrapeCity_Documents_Word_ContentObject_CanAdd_System_Type_System_Exception__">CanAdd(Type, out Exception)</a>
        </td>
        <td class="markdown level1 summary"><p>Checks whether a <a class="xref" href="GrapeCity.Documents.Word.ContentObject.html">ContentObject</a> of the specified type can be added to the current object.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_ContentObject_CanAddContentControl_GrapeCity_Documents_Word_ContentControlType_" data-uid="GrapeCity.Documents.Word.ContentObject.CanAddContentControl(GrapeCity.Documents.Word.ContentControlType)">
          <a class="xref" href="GrapeCity.Documents.Word.ContentObject.CanAddContentControl.html#GrapeCity_Documents_Word_ContentObject_CanAddContentControl_GrapeCity_Documents_Word_ContentControlType_">CanAddContentControl(ContentControlType)</a>
        </td>
        <td class="markdown level1 summary"><p>Checks whether a <a class="xref" href="GrapeCity.Documents.Word.ContentControl.html">ContentControl</a> of the specified type can be added to the current object.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_ContentObject_CanAddContentControl_GrapeCity_Documents_Word_ContentControlType_System_Exception__" data-uid="GrapeCity.Documents.Word.ContentObject.CanAddContentControl(GrapeCity.Documents.Word.ContentControlType,System.Exception@)">
          <a class="xref" href="GrapeCity.Documents.Word.ContentObject.CanAddContentControl.html#GrapeCity_Documents_Word_ContentObject_CanAddContentControl_GrapeCity_Documents_Word_ContentControlType_System_Exception__">CanAddContentControl(ContentControlType, out Exception)</a>
        </td>
        <td class="markdown level1 summary"><p>Checks whether a <a class="xref" href="GrapeCity.Documents.Word.ContentControl.html">ContentControl</a> of the specified type can be added to the current object.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_ContentObject_Delete" data-uid="GrapeCity.Documents.Word.ContentObject.Delete">
          <a class="xref" href="GrapeCity.Documents.Word.ContentObject.Delete.html#GrapeCity_Documents_Word_ContentObject_Delete">Delete()</a>
        </td>
        <td class="markdown level1 summary"><p>Deletes this content object from the parent <a class="xref" href="GrapeCity.Documents.Word.Body.html">Body</a>.</p>
<p>
Note that the position occupied by this content object in the parent can still be accessed
(e.g. to insert new content) via a <a class="xref" href="GrapeCity.Documents.Word.PersistentRange.html">PersistentRange</a> if one has previously been 
created with <a class="xref" href="GrapeCity.Documents.Word.ContentObject.GetPersistentRange.html#GrapeCity_Documents_Word_ContentObject_GetPersistentRange">GetPersistentRange()</a>.
</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_ContentObject_GetChildren__1" data-uid="GrapeCity.Documents.Word.ContentObject.GetChildren``1">
          <a class="xref" href="GrapeCity.Documents.Word.ContentObject.GetChildren.html#GrapeCity_Documents_Word_ContentObject_GetChildren__1">GetChildren&lt;T&gt;()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the collection of this content object's children of a specified type.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_ContentObject_GetPersistentRange" data-uid="GrapeCity.Documents.Word.ContentObject.GetPersistentRange">
          <a class="xref" href="GrapeCity.Documents.Word.ContentObject.GetPersistentRange.html#GrapeCity_Documents_Word_ContentObject_GetPersistentRange">GetPersistentRange()</a>
        </td>
        <td class="markdown level1 summary"><p>Creates and returns a <a class="xref" href="GrapeCity.Documents.Word.PersistentRange.html">PersistentRange</a> associated with this content object.</p>
<p>
Unlike the <a class="xref" href="GrapeCity.Documents.Word.Range.html">Range</a> returned by <a class="xref" href="GrapeCity.Documents.Word.ContentObject.GetRange.html#GrapeCity_Documents_Word_ContentObject_GetRange">GetRange()</a>, this persistent range
and any markers on it (see <a class="xref" href="GrapeCity.Documents.Word.RangeBase.Start.html#GrapeCity_Documents_Word_RangeBase_Start">Start</a> and <a class="xref" href="GrapeCity.Documents.Word.RangeBase.End.html#GrapeCity_Documents_Word_RangeBase_End">End</a>)
can still be used if the object is deleted.
</p>
<p>
Note that <a class="xref" href="GrapeCity.Documents.Word.PersistentRange.html">PersistentRange</a> should be disposed when no longer needed to improve performance.
</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_ContentObject_GetRange" data-uid="GrapeCity.Documents.Word.ContentObject.GetRange">
          <a class="xref" href="GrapeCity.Documents.Word.ContentObject.GetRange.html#GrapeCity_Documents_Word_ContentObject_GetRange">GetRange()</a>
        </td>
        <td class="markdown level1 summary"><p>Creates and returns a <a class="xref" href="GrapeCity.Documents.Word.Range.html">Range</a> associated with this content object.</p>
<p>
To get a range that can be used after the object has been deleted,
see <a class="xref" href="GrapeCity.Documents.Word.ContentObject.GetPersistentRange.html#GrapeCity_Documents_Word_ContentObject_GetPersistentRange">GetPersistentRange()</a>.
</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Word_ContentObject_ToString" data-uid="GrapeCity.Documents.Word.ContentObject.ToString">
          <a class="xref" href="GrapeCity.Documents.Word.ContentObject.ToString.html#GrapeCity_Documents_Word_ContentObject_ToString">ToString()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets string representation of the content.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
