# GrapeCity.Enterprise.Data.Expressions.Evaluation.Variant.CompareTo

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Enterprise_Data_Expressions_Evaluation_Variant_CompareTo_" data-uid="GrapeCity.Enterprise.Data.Expressions.Evaluation.Variant.CompareTo*">CompareTo Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Enterprise_Data_Expressions_Evaluation_Variant_CompareTo_" data-uid="GrapeCity.Enterprise.Data.Expressions.Evaluation.Variant.CompareTo*"></a>
<h4 id="GrapeCity_Enterprise_Data_Expressions_Evaluation_Variant_CompareTo_GrapeCity_Enterprise_Data_Expressions_Evaluation_Variant_" data-uid="GrapeCity.Enterprise.Data.Expressions.Evaluation.Variant.CompareTo(GrapeCity.Enterprise.Data.Expressions.Evaluation.Variant)">CompareTo(Variant)</h4>
<div class="markdown level1 summary"><p>Compares the Variant with the specified one.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int CompareTo(Variant b)</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="GrapeCity.Enterprise.Data.Expressions.Evaluation.Variant.html">Variant</a></td>
      <td><span class="parametername">b</span></td>
      <td><p>The Variant to be compared with.</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><pre><code>&lt;code&gt;-1&lt;/code&gt; if this value is less than 'b'.
</code></pre>
<p><code>0</code> if this value is equal to 'b'.
<code>1</code> if this value is greater than 'b'.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.icomparable-1.compareto">IComparable&lt;T&gt;.CompareTo(T)</a></div>


<a id="GrapeCity_Enterprise_Data_Expressions_Evaluation_Variant_CompareTo_" data-uid="GrapeCity.Enterprise.Data.Expressions.Evaluation.Variant.CompareTo*"></a>
<h4 id="GrapeCity_Enterprise_Data_Expressions_Evaluation_Variant_CompareTo_System_Object_" data-uid="GrapeCity.Enterprise.Data.Expressions.Evaluation.Variant.CompareTo(System.Object)">CompareTo(object)</h4>
<div class="markdown level1 summary"><p>Compares the Variant with the specified object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int CompareTo(object obj)</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">obj</span></td>
      <td><p>The object to be compared with.</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></td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.icomparable.compareto">IComparable.CompareTo(object)</a></div>
</div>
