# DDCssLib.StyleSheetRule.-ctor

## Content

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



<h1 id="DDCssLib_StyleSheetRule__ctor_" data-uid="DDCssLib.StyleSheetRule.#ctor*">StyleSheetRule Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="DDCssLib_StyleSheetRule__ctor_" data-uid="DDCssLib.StyleSheetRule.#ctor*"></a>
<h4 id="DDCssLib_StyleSheetRule__ctor" data-uid="DDCssLib.StyleSheetRule.#ctor">StyleSheetRule()</h4>
<div class="markdown level1 summary"><p>The default constructor for StyleSheetRule.<br>
A new empty CSSDeclaration will be used, the parent StyleSheetRule and ParentStyleSheet will be null.  The ClassName will be String.Empty.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public StyleSheetRule()</code></pre>
</div>


<a id="DDCssLib_StyleSheetRule__ctor_" data-uid="DDCssLib.StyleSheetRule.#ctor*"></a>
<h4 id="DDCssLib_StyleSheetRule__ctor_System_String_System_String_DDCssLib_StyleSheet_" data-uid="DDCssLib.StyleSheetRule.#ctor(System.String,System.String,DDCssLib.StyleSheet)">StyleSheetRule(string, string, StyleSheet)</h4>
<div class="markdown level1 summary"><p>Creates an instance of StyleSheetRule that will use the specified ClassName, CSSText, and ParentStyleSheet.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public StyleSheetRule(string cssText, string className, StyleSheet parentStyleSheet)</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">cssText</span></td>
      <td></td>
    </tr>
    <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></td>
    </tr>
    <tr>
      <td><a class="xref" href="DDCssLib.StyleSheet.html">StyleSheet</a></td>
      <td><span class="parametername">parentStyleSheet</span></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="DDCssLib_StyleSheetRule__ctor_" data-uid="DDCssLib.StyleSheetRule.#ctor*"></a>
<h4 id="DDCssLib_StyleSheetRule__ctor_System_String_System_String_System_String_" data-uid="DDCssLib.StyleSheetRule.#ctor(System.String,System.String,System.String)">StyleSheetRule(string, string, string)</h4>
<div class="markdown level1 summary"><p>Creates an instance of StyleSheetRule that will use the specified ClassName, CSSText, and ParentStyleSheet.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public StyleSheetRule(string cssText, string className, string parentStyleName)</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">cssText</span></td>
      <td></td>
    </tr>
    <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></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">parentStyleName</span></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="DDCssLib_StyleSheetRule__ctor_" data-uid="DDCssLib.StyleSheetRule.#ctor*"></a>
<h4 id="DDCssLib_StyleSheetRule__ctor_System_String_System_String_" data-uid="DDCssLib.StyleSheetRule.#ctor(System.String,System.String)">StyleSheetRule(string, string)</h4>
<div class="markdown level1 summary"><p>Creates an instance of StyleSheetRule that will use the specified ClassName, CSSText, and ParentStyleSheet.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public StyleSheetRule(string cssText, 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">cssText</span></td>
      <td></td>
    </tr>
    <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></td>
    </tr>
  </tbody>
</table>
</div>
