# GrapeCity.CalcEngine.IEvaluationContext.CastToInt

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_CalcEngine_IEvaluationContext_CastToInt_" data-uid="GrapeCity.CalcEngine.IEvaluationContext.CastToInt*">CastToInt Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_CalcEngine_IEvaluationContext_CastToInt_" data-uid="GrapeCity.CalcEngine.IEvaluationContext.CastToInt*"></a>
<h4 id="GrapeCity_CalcEngine_IEvaluationContext_CastToInt_System_Double_" data-uid="GrapeCity.CalcEngine.IEvaluationContext.CastToInt(System.Double)">CastToInt(double)</h4>
<div class="markdown level1 summary"><p>Casts the specified <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a> value to <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> value.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">int CastToInt(double value)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function CastToInt(value As Double) 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.double">double</a></td>
      <td><span class="parametername">value</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a> value.</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>The corresponding <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> value. <a class="xref" href="GrapeCity.CalcEngine.IEvaluationContext.Error.html#GrapeCity_CalcEngine_IEvaluationContext_Error">Error</a> will be set to <a class="xref" href="GrapeCity.CalcEngine.CalcError.html#GrapeCity_CalcEngine_CalcError_Number">Number</a> if the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a> value cannot be casted.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
