# GrapeCity.Wpf.SpreadSheet.CellType.Editors.Item-1.CompareValue

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Item_1_CompareValue_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Item`1.CompareValue*">CompareValue Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Item_1_CompareValue_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Item`1.CompareValue*"></a>
<h4 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Item_1_CompareValue__0__0_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Item`1.CompareValue(`0,`0)">CompareValue(T, T)</h4>
<div class="markdown level1 summary"><p>Compare two values of <code class="typeparamref">T</code>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected abstract int CompareValue(T first, T second)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected MustOverride Function CompareValue(first As T, second As T) 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><span class="xref">T</span></td>
      <td><span class="parametername">first</span></td>
      <td><p>The first <code class="typeparamref">T</code> to compare.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">T</span></td>
      <td><span class="parametername">second</span></td>
      <td><p>The second <code class="typeparamref">T</code> 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 32-bit signed integer indicating the lexical relationship between the two items being compared.
Less than zero indicates <code class="paramref">first</code> is less than <code class="paramref">second</code>.
Zero indicates <code class="paramref">first</code> equals <code class="paramref">second</code>.
Greater than zero indicates <code class="paramref">first</code> is greater than <code class="paramref">second</code>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
