# DDCssLib.StyleSheet.GetRuleByClassName

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="DDCssLib_StyleSheet_GetRuleByClassName_" data-uid="DDCssLib.StyleSheet.GetRuleByClassName*">GetRuleByClassName Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="DDCssLib_StyleSheet_GetRuleByClassName_" data-uid="DDCssLib.StyleSheet.GetRuleByClassName*"></a>
<h4 id="DDCssLib_StyleSheet_GetRuleByClassName_System_String_" data-uid="DDCssLib.StyleSheet.GetRuleByClassName(System.String)">GetRuleByClassName(string)</h4>
<div class="markdown level1 summary"><p>Returns the rule with the specified class name.  If the rule is not in this stylesheet, Normal stylesheet will be returned as default</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public StyleSheetRule GetRuleByClassName(string className)</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">className</span></td>
      <td><p>The case insensitive class name</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="DDCssLib.StyleSheetRule.html">StyleSheetRule</a></td>
      <td><p>The stylesheet rule with the specified class name.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
