# GrapeCity.Wpf.SpreadSheet.CellType.Editors.ObjectItem.CompareValue

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_ObjectItem_CompareValue_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.ObjectItem.CompareValue*">CompareValue Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_ObjectItem_CompareValue_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.ObjectItem.CompareValue*"></a>
<h4 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_ObjectItem_CompareValue_System_Object_System_Object_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.ObjectItem.CompareValue(System.Object,System.Object)">CompareValue(object, object)</h4>
<div class="markdown level1 summary"><p>Compare two values of object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected override int CompareValue(object first, object second)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Overrides Function CompareValue(first As Object, second As Object) 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.object">object</a></td>
      <td><span class="parametername">first</span></td>
      <td><p>An <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a> to compare.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">second</span></td>
      <td><p>An <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</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 32-bit signed integer indicating the lexical relationship between the two items being compared.
Value Condition Less than zero indicates <code class="paramref">first</code> is less than <code class="paramref">second</code>.
Zero <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>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Item-1.CompareValue.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Item_1_CompareValue__0__0_">Item&lt;object&gt;.CompareValue(object, object)</a></div>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></td>
      <td><p>If the object is not compareable, throw exception.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
