# C1.WPF.Binding.C1CalcEngine

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_Binding_C1CalcEngine" data-uid="C1.WPF.Binding.C1CalcEngine" class="text-break">C1CalcEngine Class
</h1>
  <div class="markdown level0 summary"><p>Class that parses strings and returns <a class="xref" href="C1.WPF.Binding.Expression.html">Expression</a> objects that can be evaluated.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">C1CalcEngine</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.WPF.Binding.html">C1.WPF.Binding</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.Binding.4.6.2.dll</h6>
  <h5 id="C1_WPF_Binding_C1CalcEngine_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class C1CalcEngine</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class C1CalcEngine</code></pre>
  </div>
  <h5 id="C1_WPF_Binding_C1CalcEngine_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>This class has three extensibility points:</p>
<p>Use the <b>DataContext</b> property to add an object's properties to the engine scope.</p>
<p>Use the <b>RegisterFunction</b> method to define custom functions.</p>
<p>Override the <b>GetExternalObject</b> method to add arbitrary variables to the engine scope.</p>
</div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_Binding_C1CalcEngine__ctor" data-uid="C1.WPF.Binding.C1CalcEngine.#ctor">
          <a class="xref" href="C1.WPF.Binding.C1CalcEngine.-ctor.html#C1_WPF_Binding_C1CalcEngine__ctor">C1CalcEngine()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of a <a class="xref" href="C1.WPF.Binding.C1CalcEngine.html">C1CalcEngine</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_Binding_C1CalcEngine_CacheExpressions" data-uid="C1.WPF.Binding.C1CalcEngine.CacheExpressions">
          <a class="xref" href="C1.WPF.Binding.C1CalcEngine.CacheExpressions.html#C1_WPF_Binding_C1CalcEngine_CacheExpressions">CacheExpressions</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets whether the calc engine should keep a cache with parsed
expressions.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Binding_C1CalcEngine_CultureInfo" data-uid="C1.WPF.Binding.C1CalcEngine.CultureInfo">
          <a class="xref" href="C1.WPF.Binding.C1CalcEngine.CultureInfo.html#C1_WPF_Binding_C1CalcEngine_CultureInfo">CultureInfo</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the <a class="xref" href="C1.WPF.Binding.C1CalcEngine.CultureInfo.html#C1_WPF_Binding_C1CalcEngine_CultureInfo">CultureInfo</a> to use when parsing numbers and dates.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Binding_C1CalcEngine_DataContext" data-uid="C1.WPF.Binding.C1CalcEngine.DataContext">
          <a class="xref" href="C1.WPF.Binding.C1CalcEngine.DataContext.html#C1_WPF_Binding_C1CalcEngine_DataContext">DataContext</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the DataContext for this <a class="xref" href="C1.WPF.Binding.C1CalcEngine.html">C1CalcEngine</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Binding_C1CalcEngine_Functions" data-uid="C1.WPF.Binding.C1CalcEngine.Functions">
          <a class="xref" href="C1.WPF.Binding.C1CalcEngine.Functions.html#C1_WPF_Binding_C1CalcEngine_Functions">Functions</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the dictionary that contains function definitions.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Binding_C1CalcEngine_IdentifierChars" data-uid="C1.WPF.Binding.C1CalcEngine.IdentifierChars">
          <a class="xref" href="C1.WPF.Binding.C1CalcEngine.IdentifierChars.html#C1_WPF_Binding_C1CalcEngine_IdentifierChars">IdentifierChars</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a string that specifies special characters that are valid for identifiers.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Binding_C1CalcEngine_OptimizeExpressions" data-uid="C1.WPF.Binding.C1CalcEngine.OptimizeExpressions">
          <a class="xref" href="C1.WPF.Binding.C1CalcEngine.OptimizeExpressions.html#C1_WPF_Binding_C1CalcEngine_OptimizeExpressions">OptimizeExpressions</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets whether the calc engine should optimize expressions when
they are parsed.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Binding_C1CalcEngine_Variables" data-uid="C1.WPF.Binding.C1CalcEngine.Variables">
          <a class="xref" href="C1.WPF.Binding.C1CalcEngine.Variables.html#C1_WPF_Binding_C1CalcEngine_Variables">Variables</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the dictionary that contains simple variables (not in the DataContext).</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_Binding_C1CalcEngine_Evaluate_System_String_" data-uid="C1.WPF.Binding.C1CalcEngine.Evaluate(System.String)">
          <a class="xref" href="C1.WPF.Binding.C1CalcEngine.Evaluate.html#C1_WPF_Binding_C1CalcEngine_Evaluate_System_String_">Evaluate(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Evaluates a string.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Binding_C1CalcEngine_GetExternalObject_System_String_" data-uid="C1.WPF.Binding.C1CalcEngine.GetExternalObject(System.String)">
          <a class="xref" href="C1.WPF.Binding.C1CalcEngine.GetExternalObject.html#C1_WPF_Binding_C1CalcEngine_GetExternalObject_System_String_">GetExternalObject(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets an external object based on an identifier.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Binding_C1CalcEngine_Parse_System_String_" data-uid="C1.WPF.Binding.C1CalcEngine.Parse(System.String)">
          <a class="xref" href="C1.WPF.Binding.C1CalcEngine.Parse.html#C1_WPF_Binding_C1CalcEngine_Parse_System_String_">Parse(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Parses a string into an <a class="xref" href="C1.WPF.Binding.Expression.html">Expression</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Binding_C1CalcEngine_RegisterFunction_System_String_System_Int32_C1_WPF_Binding_CalcEngineFunction_" data-uid="C1.WPF.Binding.C1CalcEngine.RegisterFunction(System.String,System.Int32,C1.WPF.Binding.CalcEngineFunction)">
          <a class="xref" href="C1.WPF.Binding.C1CalcEngine.RegisterFunction.html#C1_WPF_Binding_C1CalcEngine_RegisterFunction_System_String_System_Int32_C1_WPF_Binding_CalcEngineFunction_">RegisterFunction(string, int, CalcEngineFunction)</a>
        </td>
        <td class="markdown level1 summary"><p>Registers a function that can be evaluated by this <a class="xref" href="C1.WPF.Binding.C1CalcEngine.html">C1CalcEngine</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Binding_C1CalcEngine_RegisterFunction_System_String_System_Int32_System_Int32_C1_WPF_Binding_CalcEngineFunction_" data-uid="C1.WPF.Binding.C1CalcEngine.RegisterFunction(System.String,System.Int32,System.Int32,C1.WPF.Binding.CalcEngineFunction)">
          <a class="xref" href="C1.WPF.Binding.C1CalcEngine.RegisterFunction.html#C1_WPF_Binding_C1CalcEngine_RegisterFunction_System_String_System_Int32_System_Int32_C1_WPF_Binding_CalcEngineFunction_">RegisterFunction(string, int, int, CalcEngineFunction)</a>
        </td>
        <td class="markdown level1 summary"><p>Registers a function that can be evaluated by this <a class="xref" href="C1.WPF.Binding.C1CalcEngine.html">C1CalcEngine</a>.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
