# C1.Win.ExpressionEditor.ExpressionEditorCollection.AddFunction

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_ExpressionEditor_ExpressionEditorCollection_AddFunction_" data-uid="C1.Win.ExpressionEditor.ExpressionEditorCollection.AddFunction*">AddFunction Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_ExpressionEditor_ExpressionEditorCollection_AddFunction_" data-uid="C1.Win.ExpressionEditor.ExpressionEditorCollection.AddFunction*"></a>
<h4 id="C1_Win_ExpressionEditor_ExpressionEditorCollection_AddFunction_System_Collections_Generic_List_C1_ExpressionEditor_Engine_ExpressionItem__System_Func_System_Collections_Generic_List_System_Object__System_Object__System_Int32_System_Int32_" data-uid="C1.Win.ExpressionEditor.ExpressionEditorCollection.AddFunction(System.Collections.Generic.List{C1.ExpressionEditor.Engine.ExpressionItem},System.Func{System.Collections.Generic.List{System.Object},System.Object},System.Int32,System.Int32)">AddFunction(List&lt;ExpressionItem&gt;, Func&lt;List&lt;object&gt;, object&gt;, int, int)</h4>
<div class="markdown level1 summary"><p>Added a custom function to engine of C1ExpressionEditor.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AddFunction(List&lt;ExpressionItem&gt; items, Func&lt;List&lt;object&gt;, object&gt; function, int minArgsCount, int maxArgsCount)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AddFunction(items As List(Of ExpressionItem), [function] As Func(Of List(Of Object), Object), minArgsCount As Integer, maxArgsCount 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.collections.generic.list-1">List</a>&lt;<a class="xref" href="C1.ExpressionEditor.Engine.ExpressionItem.html">ExpressionItem</a>&gt;</td>
      <td><span class="parametername">items</span></td>
      <td><p>Provides the function description for the <a class="xref" href="C1.Win.ExpressionEditor.C1ExpressionEditorPanel.html">C1ExpressionEditorPanel</a>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</td>
      <td><span class="parametername">function</span></td>
      <td><p>The delegate that evaluates the function.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">minArgsCount</span></td>
      <td><p>Minimum arguments count.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">maxArgsCount</span></td>
      <td><p>Maximum arguments count.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
