# C1.Util.DX.Direct3D11.CommonShaderStage-1.Set

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct3D11_CommonShaderStage_1_Set_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStage`1.Set*">Set Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct3D11_CommonShaderStage_1_Set_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStage`1.Set*"></a>
<h4 id="C1_Util_DX_Direct3D11_CommonShaderStage_1_Set__0_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStage`1.Set(`0)">Set(T)</h4>
<div class="markdown level1 summary"><p>Assigns a compute shader to the device.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Set(T shader)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub [Set](shader As T)</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><span class="xref">T</span></td>
      <td><span class="parametername">shader</span></td>
      <td><p>The shader to assign to the device. Assign null to disable the compute shader.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_CommonShaderStage_1_Set_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStage`1.Set*"></a>
<h4 id="C1_Util_DX_Direct3D11_CommonShaderStage_1_Set__0_C1_Util_DX_Direct3D11_ClassInstance___" data-uid="C1.Util.DX.Direct3D11.CommonShaderStage`1.Set(`0,C1.Util.DX.Direct3D11.ClassInstance[])">Set(T, ClassInstance[])</h4>
<div class="markdown level1 summary"><p>Assigns a compute shader to the device.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Set(T shader, ClassInstance[] classInstances)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub [Set](shader As T, classInstances As ClassInstance())</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><span class="xref">T</span></td>
      <td><span class="parametername">shader</span></td>
      <td><p>The shader to assign to the device. Assign <code>null</code> to disable the compute shader.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D11.ClassInstance.html">ClassInstance</a>[]</td>
      <td><span class="parametername">classInstances</span></td>
      <td><p>An array of class-instance interfaces. Each interface used by a shader must have a corresponding class instance or the shader will get disabled.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct3D11_CommonShaderStage_1_Set_" data-uid="C1.Util.DX.Direct3D11.CommonShaderStage`1.Set*"></a>
<h4 id="C1_Util_DX_Direct3D11_CommonShaderStage_1_Set__0_C1_Util_DX_ComArray_C1_Util_DX_Direct3D11_ClassInstance__" data-uid="C1.Util.DX.Direct3D11.CommonShaderStage`1.Set(`0,C1.Util.DX.ComArray{C1.Util.DX.Direct3D11.ClassInstance})">Set(T, ComArray&lt;ClassInstance&gt;)</h4>
<div class="markdown level1 summary"><p>Assigns a compute shader to the device.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Set(T shader, ComArray&lt;ClassInstance&gt; classInstances)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub [Set](shader As T, classInstances As ComArray(Of ClassInstance))</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><span class="xref">T</span></td>
      <td><span class="parametername">shader</span></td>
      <td><p>The shader to assign to the device. Assign <code>null</code> to disable the compute shader.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.ComArray-1.html">ComArray</a>&lt;<a class="xref" href="C1.Util.DX.Direct3D11.ClassInstance.html">ClassInstance</a>&gt;</td>
      <td><span class="parametername">classInstances</span></td>
      <td><p>An array of class-instance interfaces. Each interface used by a shader must have a corresponding class instance or the shader will get disabled.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
