# GrapeCity.CalcEngine.IPrimitiveValue.CompareTo

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_CalcEngine_IPrimitiveValue_CompareTo_" data-uid="GrapeCity.CalcEngine.IPrimitiveValue.CompareTo*">CompareTo Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_CalcEngine_IPrimitiveValue_CompareTo_" data-uid="GrapeCity.CalcEngine.IPrimitiveValue.CompareTo*"></a>
<h4 id="GrapeCity_CalcEngine_IPrimitiveValue_CompareTo_GrapeCity_CalcEngine_IEvaluationContext_GrapeCity_CalcEngine_IPrimitiveValue_" data-uid="GrapeCity.CalcEngine.IPrimitiveValue.CompareTo(GrapeCity.CalcEngine.IEvaluationContext,GrapeCity.CalcEngine.IPrimitiveValue)">CompareTo(IEvaluationContext, IPrimitiveValue)</h4>
<div class="markdown level1 summary"><p>Compares this instance to a specified <a class="xref" href="GrapeCity.CalcEngine.IPrimitiveValue.html">IPrimitiveValue</a> object and returns an indication of their relative values.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">int CompareTo(IEvaluationContext context, IPrimitiveValue value)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function CompareTo(context As IEvaluationContext, value As IPrimitiveValue) 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="GrapeCity.CalcEngine.IEvaluationContext.html">IEvaluationContext</a></td>
      <td><span class="parametername">context</span></td>
      <td><p>An <span class="xref">GrapeCity.CalcEngine.EvaluationContext</span> object indicates the evaluation context.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.CalcEngine.IPrimitiveValue.html">IPrimitiveValue</a></td>
      <td><span class="parametername">value</span></td>
      <td><p>An <a class="xref" href="GrapeCity.CalcEngine.IPrimitiveValue.html">IPrimitiveValue</a> object idnicates the value to compare 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><p>A signed number indicating the relative values of this instance and value.Return Value Description Less than zero This instance is less than value. Zero This instance is equal to value. Greater than zero This instance is greater than value.-or- value is null.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
