# C1.Diagnostics.CodeAnalysis.DynamicDependencyAttribute.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Diagnostics_CodeAnalysis_DynamicDependencyAttribute__ctor_" data-uid="C1.Diagnostics.CodeAnalysis.DynamicDependencyAttribute.#ctor*">DynamicDependencyAttribute Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Diagnostics_CodeAnalysis_DynamicDependencyAttribute__ctor_" data-uid="C1.Diagnostics.CodeAnalysis.DynamicDependencyAttribute.#ctor*"></a>
<h4 id="C1_Diagnostics_CodeAnalysis_DynamicDependencyAttribute__ctor_System_String_" data-uid="C1.Diagnostics.CodeAnalysis.DynamicDependencyAttribute.#ctor(System.String)">DynamicDependencyAttribute(string)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute class with the specified signature of a member on the same type as the consumer.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public DynamicDependencyAttribute(string memberSignature)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(memberSignature As String)</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">memberSignature</span></td>
      <td><p>The signature of the member depended on.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Diagnostics_CodeAnalysis_DynamicDependencyAttribute__ctor_" data-uid="C1.Diagnostics.CodeAnalysis.DynamicDependencyAttribute.#ctor*"></a>
<h4 id="C1_Diagnostics_CodeAnalysis_DynamicDependencyAttribute__ctor_C1_Diagnostics_CodeAnalysis_DynamicallyAccessedMemberTypes_System_Type_" data-uid="C1.Diagnostics.CodeAnalysis.DynamicDependencyAttribute.#ctor(C1.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes,System.Type)">DynamicDependencyAttribute(DynamicallyAccessedMemberTypes, Type)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute class with the specified signature of a member on the same type as the consumer.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public DynamicDependencyAttribute(DynamicallyAccessedMemberTypes memberTypes, Type type)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(memberTypes As DynamicallyAccessedMemberTypes, type As Type)</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="C1.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.html">DynamicallyAccessedMemberTypes</a></td>
      <td><span class="parametername">memberTypes</span></td>
      <td><p>The types of members depended on.</p>
</td>
    </tr>
    <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>The type that contains the specified members.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Diagnostics_CodeAnalysis_DynamicDependencyAttribute__ctor_" data-uid="C1.Diagnostics.CodeAnalysis.DynamicDependencyAttribute.#ctor*"></a>
<h4 id="C1_Diagnostics_CodeAnalysis_DynamicDependencyAttribute__ctor_System_String_System_Type_" data-uid="C1.Diagnostics.CodeAnalysis.DynamicDependencyAttribute.#ctor(System.String,System.Type)">DynamicDependencyAttribute(string, Type)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute class with the specified signature of a member on the same type as the consumer.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public DynamicDependencyAttribute(string memberSignature, Type type)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(memberSignature As String, type As Type)</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">memberSignature</span></td>
      <td><p>The signature of the member depended on.</p>
</td>
    </tr>
    <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>The type that contains the specified members.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Diagnostics_CodeAnalysis_DynamicDependencyAttribute__ctor_" data-uid="C1.Diagnostics.CodeAnalysis.DynamicDependencyAttribute.#ctor*"></a>
<h4 id="C1_Diagnostics_CodeAnalysis_DynamicDependencyAttribute__ctor_C1_Diagnostics_CodeAnalysis_DynamicallyAccessedMemberTypes_System_String_System_String_" data-uid="C1.Diagnostics.CodeAnalysis.DynamicDependencyAttribute.#ctor(C1.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes,System.String,System.String)">DynamicDependencyAttribute(DynamicallyAccessedMemberTypes, string, string)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute class with the specified signature of a member on the same type as the consumer.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public DynamicDependencyAttribute(DynamicallyAccessedMemberTypes memberTypes, string typeName, string assemblyName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(memberTypes As DynamicallyAccessedMemberTypes, typeName As String, assemblyName As String)</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="C1.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.html">DynamicallyAccessedMemberTypes</a></td>
      <td><span class="parametername">memberTypes</span></td>
      <td><p>The types of members depended on.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">typeName</span></td>
      <td><p>The full name of the type containing the specified members.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">assemblyName</span></td>
      <td><p>The assembly name of the type containing the specified members.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Diagnostics_CodeAnalysis_DynamicDependencyAttribute__ctor_" data-uid="C1.Diagnostics.CodeAnalysis.DynamicDependencyAttribute.#ctor*"></a>
<h4 id="C1_Diagnostics_CodeAnalysis_DynamicDependencyAttribute__ctor_System_String_System_String_System_String_" data-uid="C1.Diagnostics.CodeAnalysis.DynamicDependencyAttribute.#ctor(System.String,System.String,System.String)">DynamicDependencyAttribute(string, string, string)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute class with the specified signature of a member on the same type as the consumer.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public DynamicDependencyAttribute(string memberSignature, string typeName, string assemblyName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(memberSignature As String, typeName As String, assemblyName As String)</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">memberSignature</span></td>
      <td><p>The signature of the member depended on.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">typeName</span></td>
      <td><p>The full name of the type containing the specified members.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">assemblyName</span></td>
      <td><p>The assembly name of the type containing the specified members.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
