# GrapeCity.Enterprise.Data.Expressions.Evaluation.DynamicDispatch.Invoke

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Enterprise_Data_Expressions_Evaluation_DynamicDispatch_Invoke_" data-uid="GrapeCity.Enterprise.Data.Expressions.Evaluation.DynamicDispatch.Invoke*">Invoke Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Enterprise_Data_Expressions_Evaluation_DynamicDispatch_Invoke_" data-uid="GrapeCity.Enterprise.Data.Expressions.Evaluation.DynamicDispatch.Invoke*"></a>
<h4 id="GrapeCity_Enterprise_Data_Expressions_Evaluation_DynamicDispatch_Invoke_System_String_System_Object_System_Object___" data-uid="GrapeCity.Enterprise.Data.Expressions.Evaluation.DynamicDispatch.Invoke(System.String,System.Object,System.Object[])">Invoke(string, object, object[])</h4>
<div class="markdown level1 summary"><p>Invokes an instance method on a given object using dynamic dispatch.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static object Invoke(string methodName, object target, object[] args)</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">methodName</span></td>
      <td><p>The name of the method to invoke.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">target</span></td>
      <td><p>The object on which to invoke the method. Must not be <code>null</code>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>[]</td>
      <td><span class="parametername">args</span></td>
      <td><p>An array of arguments to pass to the method. If no arguments are needed, pass <code>null</code> or an empty array.</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.object">object</a></td>
      <td><p>The value returned by the invoked method, if any. If the method has no return value, <code>null</code> is returned.</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>Thrown if <code class="paramref">target</code> is <code>null</code>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
