# C1.Document.Utils.GetMethod

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Document_Utils_GetMethod_" data-uid="C1.Document.Utils.GetMethod*">GetMethod Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Document_Utils_GetMethod_" data-uid="C1.Document.Utils.GetMethod*"></a>
<h4 id="C1_Document_Utils_GetMethod_System_Type_System_String_System_Reflection_BindingFlags_System_Type___" data-uid="C1.Document.Utils.GetMethod(System.Type,System.String,System.Reflection.BindingFlags,System.Type[])">GetMethod(Type, string, BindingFlags, Type[])</h4>
<div class="markdown level1 summary"><p>Searches for the specified method whose parameters match the specified argument
types and modifiers, using the specified binding constraints.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static MethodInfo GetMethod(Type type, string name, BindingFlags bindingFlags, Type[] paramTypes)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function GetMethod(type As Type, name As String, bindingFlags As BindingFlags, paramTypes As Type()) As MethodInfo</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.type">Type</a></td>
      <td><span class="parametername">type</span></td>
      <td><p>Represents type declarations: class types, interface types, array types, value
types, enumeration types, type parameters, generic type definitions, and open or closed constructed generic types.</p>
</td>
    </tr>
    <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 string containing the name of the method to get.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.reflection.bindingflags">BindingFlags</a></td>
      <td><span class="parametername">bindingFlags</span></td>
      <td><p>A bitmask comprised of one or more System.Reflection.BindingFlags that specify
how the search is conducted. -or- Zero, to return null.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.type">Type</a>[]</td>
      <td><span class="parametername">paramTypes</span></td>
      <td><p>An array of System.Type objects representing the number, order, and type of the
parameters for the method to get. -or- An empty array of System.Type objects
(as provided by the System.Type.EmptyTypes field) to get a method that takes no parameters.</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.reflection.methodinfo">MethodInfo</a></td>
      <td><p>An object representing the method that matches the specified requirements, if found; otherwise, null.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
