# C1.Schedule.AppointmentComparer.Compare

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Schedule_AppointmentComparer_Compare_" data-uid="C1.Schedule.AppointmentComparer.Compare*">Compare Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Schedule_AppointmentComparer_Compare_" data-uid="C1.Schedule.AppointmentComparer.Compare*"></a>
<h4 id="C1_Schedule_AppointmentComparer_Compare_C1_Schedule_Appointment_C1_Schedule_Appointment_" data-uid="C1.Schedule.AppointmentComparer.Compare(C1.Schedule.Appointment,C1.Schedule.Appointment)">Compare(Appointment, Appointment)</h4>
<div class="markdown level1 summary"><p>Performs a comparison of two <a class="xref" href="C1.Schedule.Appointment.html">Appointment</a> objects and returns
a value indicating whether the one <a class="xref" href="C1.Schedule.Appointment.html">Appointment</a> starts earlier,
at the same time, or later than the other.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public override int Compare(Appointment x, Appointment y)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overrides Function Compare(x As Appointment, y As Appointment) 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="C1.Schedule.Appointment.html">Appointment</a></td>
      <td><span class="parametername">x</span></td>
      <td><p>The first <a class="xref" href="C1.Schedule.Appointment.html">Appointment</a> to compare.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Schedule.Appointment.html">Appointment</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>The second <a class="xref" href="C1.Schedule.Appointment.html">Appointment</a> to compare.</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="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>Less than zero - x occurs earlier than y.
Zero - x and y occur at the same time.
Greater than zero - x occurs later than y.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.comparer-1.compare">Comparer&lt;Appointment&gt;.Compare(Appointment, Appointment)</a></div>
</div>
