# C1.C1Preview.OutlineNodeCollection.Add

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Preview_OutlineNodeCollection_Add_" data-uid="C1.C1Preview.OutlineNodeCollection.Add*">Add Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Preview_OutlineNodeCollection_Add_" data-uid="C1.C1Preview.OutlineNodeCollection.Add*"></a>
<h4 id="C1_C1Preview_OutlineNodeCollection_Add_C1_C1Preview_OutlineNode_" data-uid="C1.C1Preview.OutlineNodeCollection.Add(C1.C1Preview.OutlineNode)">Add(OutlineNode)</h4>
<div class="markdown level1 summary"><p>Adds a node to the current collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int Add(OutlineNode node)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Add(node As OutlineNode) 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="C1.C1Preview.OutlineNode.html">OutlineNode</a></td>
      <td><span class="parametername">node</span></td>
      <td><p>The node to add.</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.int32">int</a></td>
      <td><p>The index of the newly added node in the current collection.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_OutlineNodeCollection_Add_" data-uid="C1.C1Preview.OutlineNodeCollection.Add*"></a>
<h4 id="C1_C1Preview_OutlineNodeCollection_Add_System_String_" data-uid="C1.C1Preview.OutlineNodeCollection.Add(System.String)">Add(string)</h4>
<div class="markdown level1 summary"><p>Adds a node with the specified caption and location to the current collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int Add(string caption)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Add(caption As String) 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.string">string</a></td>
      <td><span class="parametername">caption</span></td>
      <td><p>The caption of the node to add.</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.int32">int</a></td>
      <td><p>The index of the newly added node in the current collection.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_OutlineNodeCollection_Add_" data-uid="C1.C1Preview.OutlineNodeCollection.Add*"></a>
<h4 id="C1_C1Preview_OutlineNodeCollection_Add_System_String_C1_C1Preview_IDocumentLocation_" data-uid="C1.C1Preview.OutlineNodeCollection.Add(System.String,C1.C1Preview.IDocumentLocation)">Add(string, IDocumentLocation)</h4>
<div class="markdown level1 summary"><p>Adds a node with the specified caption and location to the current collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int Add(string caption, IDocumentLocation location)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Add(caption As String, location As IDocumentLocation) 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.string">string</a></td>
      <td><span class="parametername">caption</span></td>
      <td><p>The caption of the node to add.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.C1Preview.IDocumentLocation.html">IDocumentLocation</a></td>
      <td><span class="parametername">location</span></td>
      <td><p>The location associated with the node.</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.int32">int</a></td>
      <td><p>The index of the newly added node in the current collection.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_OutlineNodeCollection_Add_" data-uid="C1.C1Preview.OutlineNodeCollection.Add*"></a>
<h4 id="C1_C1Preview_OutlineNodeCollection_Add_System_String_C1_C1Preview_C1LinkTarget_" data-uid="C1.C1Preview.OutlineNodeCollection.Add(System.String,C1.C1Preview.C1LinkTarget)">Add(string, C1LinkTarget)</h4>
<div class="markdown level1 summary"><p>Adds a node with the specified caption and link target to the current collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int Add(string caption, C1LinkTarget linkTarget)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Add(caption As String, linkTarget As C1LinkTarget) 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.string">string</a></td>
      <td><span class="parametername">caption</span></td>
      <td><p>The caption of the node to add.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.C1Preview.C1LinkTarget.html">C1LinkTarget</a></td>
      <td><span class="parametername">linkTarget</span></td>
      <td><p>The <a class="xref" href="C1.C1Preview.C1LinkTarget.html">C1LinkTarget</a> associated with the node.</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.int32">int</a></td>
      <td><p>The index of the newly added node in the current collection.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_OutlineNodeCollection_Add_" data-uid="C1.C1Preview.OutlineNodeCollection.Add*"></a>
<h4 id="C1_C1Preview_OutlineNodeCollection_Add_System_String_C1_C1Preview_IDocumentLocation_System_Drawing_Icon_" data-uid="C1.C1Preview.OutlineNodeCollection.Add(System.String,C1.C1Preview.IDocumentLocation,System.Drawing.Icon)">Add(string, IDocumentLocation, Icon)</h4>
<div class="markdown level1 summary"><p>Adds a node with the specified caption, location and icon to the current collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int Add(string caption, IDocumentLocation location, Icon icon)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Add(caption As String, location As IDocumentLocation, icon As Icon) 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.string">string</a></td>
      <td><span class="parametername">caption</span></td>
      <td><p>The caption of the node to add.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.C1Preview.IDocumentLocation.html">IDocumentLocation</a></td>
      <td><span class="parametername">location</span></td>
      <td><p>The location associated with the node.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.icon">Icon</a></td>
      <td><span class="parametername">icon</span></td>
      <td><p>The icon associated with the node.</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.int32">int</a></td>
      <td><p>The index of the newly added node in the current collection.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
