# C1.Schedule.Appointment.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Schedule_Appointment__ctor_" data-uid="C1.Schedule.Appointment.#ctor*">Appointment Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Schedule_Appointment__ctor_" data-uid="C1.Schedule.Appointment.#ctor*"></a>
<h4 id="C1_Schedule_Appointment__ctor_System_Int32_" data-uid="C1.Schedule.Appointment.#ctor(System.Int32)">Appointment(int)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Schedule.Appointment.html">Appointment</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 Appointment(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 appointment key.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Schedule_Appointment__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_Appointment__ctor_" data-uid="C1.Schedule.Appointment.#ctor*"></a>
<h4 id="C1_Schedule_Appointment__ctor_System_Guid_" data-uid="C1.Schedule.Appointment.#ctor(System.Guid)">Appointment(Guid)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Schedule.Appointment.html">Appointment</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 Appointment(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 appointment key.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Schedule_Appointment__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_Appointment__ctor_" data-uid="C1.Schedule.Appointment.#ctor*"></a>
<h4 id="C1_Schedule_Appointment__ctor" data-uid="C1.Schedule.Appointment.#ctor">Appointment()</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Schedule.Appointment.html">Appointment</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Appointment()</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New()</code></pre>
</div>
<h5 id="C1_Schedule_Appointment__ctor_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Creates an appointment with default properties.</p>
</div>


<a id="C1_Schedule_Appointment__ctor_" data-uid="C1.Schedule.Appointment.#ctor*"></a>
<h4 id="C1_Schedule_Appointment__ctor_System_DateTime_System_DateTime_" data-uid="C1.Schedule.Appointment.#ctor(System.DateTime,System.DateTime)">Appointment(DateTime, DateTime)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Schedule.Appointment.html">Appointment</a>
class with the specified parameters.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Appointment(DateTime start, DateTime end)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(start As Date, [end] As Date)</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.datetime">DateTime</a></td>
      <td><span class="parametername">start</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a> value which specifies
the start date and time of the appointment.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a></td>
      <td><span class="parametername">end</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a> value which specifies
the end date and time of the appointment.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Schedule_Appointment__ctor_" data-uid="C1.Schedule.Appointment.#ctor*"></a>
<h4 id="C1_Schedule_Appointment__ctor_System_DateTime_System_TimeSpan_" data-uid="C1.Schedule.Appointment.#ctor(System.DateTime,System.TimeSpan)">Appointment(DateTime, TimeSpan)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Schedule.Appointment.html">Appointment</a>
class with the specified parameters.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Appointment(DateTime start, TimeSpan duration)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(start As Date, duration As TimeSpan)</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.datetime">DateTime</a></td>
      <td><span class="parametername">start</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a> value which specifies
the start date and time of the appointment.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.timespan">TimeSpan</a></td>
      <td><span class="parametername">duration</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.timespan">TimeSpan</a> value which specifies
the duration of the appointment.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Schedule_Appointment__ctor_" data-uid="C1.Schedule.Appointment.#ctor*"></a>
<h4 id="C1_Schedule_Appointment__ctor_System_DateTime_System_DateTime_System_String_" data-uid="C1.Schedule.Appointment.#ctor(System.DateTime,System.DateTime,System.String)">Appointment(DateTime, DateTime, string)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Schedule.Appointment.html">Appointment</a>
class with the specified parameters.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Appointment(DateTime start, DateTime end, string subject)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(start As Date, [end] As Date, subject 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.datetime">DateTime</a></td>
      <td><span class="parametername">start</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a> value which specifies
the start date and time of the appointment.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a></td>
      <td><span class="parametername">end</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a> value which specifies
the end date and time of the appointment.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">subject</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a> value which contains
the subject of the appointment.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Schedule_Appointment__ctor_" data-uid="C1.Schedule.Appointment.#ctor*"></a>
<h4 id="C1_Schedule_Appointment__ctor_System_DateTime_System_TimeSpan_System_String_" data-uid="C1.Schedule.Appointment.#ctor(System.DateTime,System.TimeSpan,System.String)">Appointment(DateTime, TimeSpan, string)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Schedule.Appointment.html">Appointment</a>
class with the specified parameters.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Appointment(DateTime start, TimeSpan duration, string subject)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(start As Date, duration As TimeSpan, subject 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.datetime">DateTime</a></td>
      <td><span class="parametername">start</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a> value which specifies
the start date and time of the appointment.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.timespan">TimeSpan</a></td>
      <td><span class="parametername">duration</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.timespan">TimeSpan</a> value which specifies
the duration of the appointment.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">subject</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a> value which contains
the subject of the appointment.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Schedule_Appointment__ctor_" data-uid="C1.Schedule.Appointment.#ctor*"></a>
<h4 id="C1_Schedule_Appointment__ctor_System_Runtime_Serialization_SerializationInfo_System_Runtime_Serialization_StreamingContext_" data-uid="C1.Schedule.Appointment.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">Appointment(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 Appointment(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>
