# C1.Win.GanttView.TaskComparer.Compare

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_GanttView_TaskComparer_Compare_" data-uid="C1.Win.GanttView.TaskComparer.Compare*">Compare Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_GanttView_TaskComparer_Compare_" data-uid="C1.Win.GanttView.TaskComparer.Compare*"></a>
<h4 id="C1_Win_GanttView_TaskComparer_Compare_C1_Win_GanttView_Task_C1_Win_GanttView_Task_" data-uid="C1.Win.GanttView.TaskComparer.Compare(C1.Win.GanttView.Task,C1.Win.GanttView.Task)">Compare(Task, Task)</h4>
<div class="markdown level1 summary"><p>Compares two tasks and returns a value indicating whether one is less than, equal to, or greater 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 int Compare(Task x, Task y)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Compare(x As Task, y As Task) 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.Win.GanttView.Task.html">Task</a></td>
      <td><span class="parametername">x</span></td>
      <td><p>The first <a class="xref" href="C1.Win.GanttView.Task.html">Task</a> to compare.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.GanttView.Task.html">Task</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>The second <a class="xref" href="C1.Win.GanttView.Task.html">Task</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>A signed integer that indicates the relative values of x and y; less than zero: x is less than y, zero: x equals y; greater than zero: x is greater than y.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icomparer-1.compare">IComparer&lt;T&gt;.Compare(T, T)</a></div>
</div>
