# C1.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Diagnostics_CodeAnalysis_RequiresDynamicCodeAttribute" data-uid="C1.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute" class="text-break">RequiresDynamicCodeAttribute Class
</h1>
  <div class="markdown level0 summary"><p>Indicates that the specified method requires the ability to generate new code at runtime, for example through System.Reflection.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.attribute">Attribute</a></div>
    <div class="level2"><span class="xref">RequiresDynamicCodeAttribute</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Diagnostics.CodeAnalysis.html">C1.Diagnostics.CodeAnalysis</a></h6>
  <h6><strong>Assembly</strong>: C1.DataCollection.dll</h6>
  <h5 id="C1_Diagnostics_CodeAnalysis_RequiresDynamicCodeAttribute_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[AttributeUsage(AttributeTargets.Class|AttributeTargets.Constructor|AttributeTargets.Method, Inherited = false)]
public sealed class RequiresDynamicCodeAttribute : Attribute</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;AttributeUsage(AttributeTargets.ClassOrAttributeTargets.ConstructorOrAttributeTargets.Method, Inherited:=False)&gt;
Public NotInheritable Class RequiresDynamicCodeAttribute
    Inherits Attribute</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Diagnostics_CodeAnalysis_RequiresDynamicCodeAttribute__ctor_System_String_" data-uid="C1.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute.#ctor(System.String)">
          <a class="xref" href="C1.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute.-ctor.html#C1_Diagnostics_CodeAnalysis_RequiresDynamicCodeAttribute__ctor_System_String_">RequiresDynamicCodeAttribute(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute class with the specified message.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Diagnostics_CodeAnalysis_RequiresDynamicCodeAttribute_Message" data-uid="C1.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute.Message">
          <a class="xref" href="C1.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute.Message.html#C1_Diagnostics_CodeAnalysis_RequiresDynamicCodeAttribute_Message">Message</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a message that contains information about the usage of dynamic code.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Diagnostics_CodeAnalysis_RequiresDynamicCodeAttribute_Url" data-uid="C1.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute.Url">
          <a class="xref" href="C1.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute.Url.html#C1_Diagnostics_CodeAnalysis_RequiresDynamicCodeAttribute_Url">Url</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets an optional URL that contains more information about the method,
why it requires dynamic code, and what options a consumer has to deal with it.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
