# C1.Schedule.Label.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Schedule_Label__ctor_" data-uid="C1.Schedule.Label.#ctor*">Label Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Schedule_Label__ctor_" data-uid="C1.Schedule.Label.#ctor*"></a>
<h4 id="C1_Schedule_Label__ctor_System_Int32_" data-uid="C1.Schedule.Label.#ctor(System.Int32)">Label(int)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Schedule.Label.html">Label</a> class with the specified key.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Label(int key)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(key 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.int32">int</a></td>
      <td><span class="parametername">key</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> value which should be used as label key.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Schedule_Label__ctor_System_Int32__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Use this constructor if your business logic requires setting custom key value.
Make sure that you use the correct constructor overload (with integer or Guid key value) and that key value is unique.</p>
</div>


<a id="C1_Schedule_Label__ctor_" data-uid="C1.Schedule.Label.#ctor*"></a>
<h4 id="C1_Schedule_Label__ctor_System_Guid_" data-uid="C1.Schedule.Label.#ctor(System.Guid)">Label(Guid)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Schedule.Label.html">Label</a> class with the specified key.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Label(Guid key)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(key As Guid)</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.guid">Guid</a></td>
      <td><span class="parametername">key</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a> value which should be used as label key.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Schedule_Label__ctor_System_Guid__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Use this constructor if your business logic requires setting custom key value.
Make sure that you use the correct constructor overload (with integer or Guid key value) and that key value is unique.</p>
</div>


<a id="C1_Schedule_Label__ctor_" data-uid="C1.Schedule.Label.#ctor*"></a>
<h4 id="C1_Schedule_Label__ctor" data-uid="C1.Schedule.Label.#ctor">Label()</h4>
<div class="markdown level1 summary"><p>Creates the new <a class="xref" href="C1.Schedule.Label.html">Label</a> object with default parameters.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Label()</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New()</code></pre>
</div>


<a id="C1_Schedule_Label__ctor_" data-uid="C1.Schedule.Label.#ctor*"></a>
<h4 id="C1_Schedule_Label__ctor_System_String_" data-uid="C1.Schedule.Label.#ctor(System.String)">Label(string)</h4>
<div class="markdown level1 summary"><p>Creates custom <a class="xref" href="C1.Schedule.Label.html">Label</a> object with specified text.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Label(string text)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(text As String)</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">text</span></td>
      <td><p>The text of the label.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Schedule_Label__ctor_" data-uid="C1.Schedule.Label.#ctor*"></a>
<h4 id="C1_Schedule_Label__ctor_System_String_System_String_" data-uid="C1.Schedule.Label.#ctor(System.String,System.String)">Label(string, string)</h4>
<div class="markdown level1 summary"><p>Creates custom <a class="xref" href="C1.Schedule.Label.html">Label</a> object with specified text and menu caption.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Label(string text, string menuCaption)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(text As String, menuCaption As String)</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">text</span></td>
      <td><p>The text of the label.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">menuCaption</span></td>
      <td><p>The menu caption for displaying label in dialogs.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Schedule_Label__ctor_" data-uid="C1.Schedule.Label.#ctor*"></a>
<h4 id="C1_Schedule_Label__ctor_System_Drawing_Color_System_String_System_String_" data-uid="C1.Schedule.Label.#ctor(System.Drawing.Color,System.String,System.String)">Label(Color, string, string)</h4>
<div class="markdown level1 summary"><p>Creates custom <a class="xref" href="C1.Schedule.Label.html">Label</a> object with specified color, text and menu caption.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Label(Color color, string text, string menuCaption)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(color As Color, text As String, menuCaption As String)</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.drawing.color">Color</a></td>
      <td><span class="parametername">color</span></td>
      <td><p>The color of the label.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>The text of the label.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">menuCaption</span></td>
      <td><p>The menu caption for displaying label in dialogs.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Schedule_Label__ctor_" data-uid="C1.Schedule.Label.#ctor*"></a>
<h4 id="C1_Schedule_Label__ctor_System_Runtime_Serialization_SerializationInfo_System_Runtime_Serialization_StreamingContext_" data-uid="C1.Schedule.Label.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">Label(SerializationInfo, StreamingContext)</h4>
<div class="markdown level1 summary"><p>Special constructor for deserialization.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected Label(SerializationInfo info, StreamingContext context)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Sub New(info As SerializationInfo, context As StreamingContext)</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.runtime.serialization.serializationinfo">SerializationInfo</a></td>
      <td><span class="parametername">info</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.runtime.serialization.serializationinfo">SerializationInfo</a>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.runtime.serialization.streamingcontext">StreamingContext</a></td>
      <td><span class="parametername">context</span></td>
      <td><p>The context information.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
