# GrapeCity.Core.IDocumentProperties.Add

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Core_IDocumentProperties_Add_" data-uid="GrapeCity.Core.IDocumentProperties.Add*">Add Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Core_IDocumentProperties_Add_" data-uid="GrapeCity.Core.IDocumentProperties.Add*"></a>
<h4 id="GrapeCity_Core_IDocumentProperties_Add_System_String_GrapeCity_Core_DocumentPropertyType_System_Object_" data-uid="GrapeCity.Core.IDocumentProperties.Add(System.String,GrapeCity.Core.DocumentPropertyType,System.Object)">Add(string, DocumentPropertyType, object)</h4>
<div class="markdown level1 summary"><p>Creates a new custom document property. You can add a new document property only to the custom <a class="xref" href="GrapeCity.Core.IDocumentProperties.html">IDocumentProperties</a> collection.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">void Add(string name, DocumentPropertyType type = (DocumentPropertyType)0, object value = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Sub Add(name As String, Optional type As DocumentPropertyType = 0, Optional value As Object = Nothing)</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">name</span></td>
      <td><p>The name of the document property.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Core.DocumentPropertyType.html">DocumentPropertyType</a></td>
      <td><span class="parametername">type</span></td>
      <td><p>The data type of the document property.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">value</span></td>
      <td><p>The data value of the document property.
The value is converted to match the data type specified by the <code class="paramref">type</code> argument, and if it can't be converted, <code>false</code> returned.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
