# C1.Win.C1DynamicHelp.TopicMap.Add

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_C1DynamicHelp_TopicMap_Add_" data-uid="C1.Win.C1DynamicHelp.TopicMap.Add*">Add Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_C1DynamicHelp_TopicMap_Add_" data-uid="C1.Win.C1DynamicHelp.TopicMap.Add*"></a>
<h4 id="C1_Win_C1DynamicHelp_TopicMap_Add_System_Object_C1_Win_C1DynamicHelp_MapItem_" data-uid="C1.Win.C1DynamicHelp.TopicMap.Add(System.Object,C1.Win.C1DynamicHelp.MapItem)">Add(object, MapItem)</h4>
<div class="markdown level1 summary"><p>Adds the specified <code class="paramref">uiElement</code> and value to the <a class="xref" href="C1.Win.C1DynamicHelp.TopicMap.html">TopicMap</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Add(object uiElement, MapItem info)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Add(uiElement As Object, info As MapItem)</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.object">object</a></td>
      <td><span class="parametername">uiElement</span></td>
      <td><p>The key of the element to add.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.C1DynamicHelp.MapItem.html">MapItem</a></td>
      <td><span class="parametername">info</span></td>
      <td><p>The value of the element to add.</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.argumentnullexception">ArgumentNullException</a></td>
      <td><p>uiElement or info is null</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></td>
      <td><p>An element with the same <code class="paramref">uiElement</code> already exists in the <a class="xref" href="C1.Win.C1DynamicHelp.TopicMap.html">TopicMap</a>.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_C1DynamicHelp_TopicMap_Add_" data-uid="C1.Win.C1DynamicHelp.TopicMap.Add*"></a>
<h4 id="C1_Win_C1DynamicHelp_TopicMap_Add_System_String_C1_Win_C1DynamicHelp_MapItem_" data-uid="C1.Win.C1DynamicHelp.TopicMap.Add(System.String,C1.Win.C1DynamicHelp.MapItem)">Add(string, MapItem)</h4>
<div class="markdown level1 summary"><p>Adds the specified <code class="paramref">path</code> and value to the <a class="xref" href="C1.Win.C1DynamicHelp.TopicMap.html">TopicMap</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Add(string path, MapItem info)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Add(path As String, info As MapItem)</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">path</span></td>
      <td><p>The key of the element to add.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.C1DynamicHelp.MapItem.html">MapItem</a></td>
      <td><span class="parametername">info</span></td>
      <td><p>The value of the element to add.</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.argumentnullexception">ArgumentNullException</a></td>
      <td><p>path or info is null</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></td>
      <td><p>An element with the same <code class="paramref">path</code> already exists in the <a class="xref" href="C1.Win.C1DynamicHelp.TopicMap.html">TopicMap</a>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
