# C1.Util.DX.Direct2D.InputElement.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct2D_InputElement__ctor_" data-uid="C1.Util.DX.Direct2D.InputElement.#ctor*">InputElement Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct2D_InputElement__ctor_" data-uid="C1.Util.DX.Direct2D.InputElement.#ctor*"></a>
<h4 id="C1_Util_DX_Direct2D_InputElement__ctor_System_String_System_Int32_C1_Util_DX_DXGI_Format_System_Int32_" data-uid="C1.Util.DX.Direct2D.InputElement.#ctor(System.String,System.Int32,C1.Util.DX.DXGI.Format,System.Int32)">InputElement(string, int, Format, int)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <span class="xref">C1.Win.DX.Direct2D.InputElement</span> struct.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public InputElement(string name, int index, Format format, int slot)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(name As String, index As Integer, format As Format, slot 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.string">string</a></td>
      <td><span class="parametername">name</span></td>
      <td><p>The HLSL semantic associated with this element in a shader input-signature.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">index</span></td>
      <td><p>The semantic index for the element. A semantic index modifies a semantic, with an integer index number. A semantic index is only needed in a case where there is more than one element with the same semantic. For example, a 4x4 matrix would have four components each with the semantic name matrix, however each of the four component would have different semantic indices (0, 1, 2, and 3).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DXGI.Format.html">Format</a></td>
      <td><span class="parametername">format</span></td>
      <td><p>The data type of the element data.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">slot</span></td>
      <td><p>An integer value that identifies the input-assembler. Valid values are between 0 and 15.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct2D_InputElement__ctor_" data-uid="C1.Util.DX.Direct2D.InputElement.#ctor*"></a>
<h4 id="C1_Util_DX_Direct2D_InputElement__ctor_System_String_System_Int32_C1_Util_DX_DXGI_Format_System_Int32_System_Int32_" data-uid="C1.Util.DX.Direct2D.InputElement.#ctor(System.String,System.Int32,C1.Util.DX.DXGI.Format,System.Int32,System.Int32)">InputElement(string, int, Format, int, int)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <span class="xref">C1.Win.DX.Direct2D.InputElement</span> struct.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public InputElement(string name, int index, Format format, int offset, int slot)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(name As String, index As Integer, format As Format, offset As Integer, slot 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.string">string</a></td>
      <td><span class="parametername">name</span></td>
      <td><p>The HLSL semantic associated with this element in a shader input-signature.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">index</span></td>
      <td><p>The semantic index for the element. A semantic index modifies a semantic, with an integer index number. A semantic index is only needed in a case where there is more than one element with the same semantic. For example, a 4x4 matrix would have four components each with the semantic name matrix, however each of the four component would have different semantic indices (0, 1, 2, and 3).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DXGI.Format.html">Format</a></td>
      <td><span class="parametername">format</span></td>
      <td><p>The data type of the element data.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">offset</span></td>
      <td><p>Offset (in bytes) between each element. Use AppendAligned for convenience to define the current element directly after the previous one, including any packing if necessary.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">slot</span></td>
      <td><p>An integer value that identifies the input-assembler. Valid values are between 0 and 15.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
