# C1.WPF.Binding.Expression

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_Binding_Expression" data-uid="C1.WPF.Binding.Expression" class="text-break">Expression Class
</h1>
  <div class="markdown level0 summary"><p>Base class that represents parsed expressions.</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">Expression</span></div>
      <div class="level2"><a class="xref" href="C1.WPF.Binding.XObjectExpression.html">XObjectExpression</a></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.icomparable-1">IComparable</a>&lt;<a class="xref" href="C1.WPF.Binding.Expression.html">Expression</a>&gt;</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_Expression_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class Expression : IComparable&lt;Expression&gt;</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class Expression
    Implements IComparable(Of Expression)</code></pre>
  </div>
  <h5 id="C1_WPF_Binding_Expression_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>For example:</p>
<pre><code class="lang-csharp">Expression expr = scriptEngine.Parse(strExpression);
object val = expr.Evaluate();</code></pre>
</div>
  <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_Expression_CompareTo_C1_WPF_Binding_Expression_" data-uid="C1.WPF.Binding.Expression.CompareTo(C1.WPF.Binding.Expression)">
          <a class="xref" href="C1.WPF.Binding.Expression.CompareTo.html#C1_WPF_Binding_Expression_CompareTo_C1_WPF_Binding_Expression_">CompareTo(Expression)</a>
        </td>
        <td class="markdown level1 summary"><p>Compares the value of this <a class="xref" href="C1.WPF.Binding.Expression.html">Expression</a> to the value of another <a class="xref" href="C1.WPF.Binding.Expression.html">Expression</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Binding_Expression_Evaluate" data-uid="C1.WPF.Binding.Expression.Evaluate">
          <a class="xref" href="C1.WPF.Binding.Expression.Evaluate.html#C1_WPF_Binding_Expression_Evaluate">Evaluate()</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the value of the <a class="xref" href="C1.WPF.Binding.Expression.html">Expression</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Binding_Expression_Optimize" data-uid="C1.WPF.Binding.Expression.Optimize">
          <a class="xref" href="C1.WPF.Binding.Expression.Optimize.html#C1_WPF_Binding_Expression_Optimize">Optimize()</a>
        </td>
        <td class="markdown level1 summary"><p>Returns an equal or simpler (but equivalent) version of the <a class="xref" href="C1.WPF.Binding.Expression.html">Expression</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="operators">Operators
</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_Expression_op_Implicit_C1_WPF_Binding_Expression__System_Boolean" data-uid="C1.WPF.Binding.Expression.op_Implicit(C1.WPF.Binding.Expression)~System.Boolean">
          <a class="xref" href="C1.WPF.Binding.Expression.op_Implicit.html#C1_WPF_Binding_Expression_op_Implicit_C1_WPF_Binding_Expression__System_Boolean">implicit operator bool(Expression)</a>
        </td>
        <td class="markdown level1 summary"><p>Evaluates the expression and returns the result converted to a Boolean value.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Binding_Expression_op_Implicit_C1_WPF_Binding_Expression__System_DateTime" data-uid="C1.WPF.Binding.Expression.op_Implicit(C1.WPF.Binding.Expression)~System.DateTime">
          <a class="xref" href="C1.WPF.Binding.Expression.op_Implicit.html#C1_WPF_Binding_Expression_op_Implicit_C1_WPF_Binding_Expression__System_DateTime">implicit operator DateTime(Expression)</a>
        </td>
        <td class="markdown level1 summary"><p>Evaluates the expression and returns the result converted to a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a> value.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Binding_Expression_op_Implicit_C1_WPF_Binding_Expression__System_Double" data-uid="C1.WPF.Binding.Expression.op_Implicit(C1.WPF.Binding.Expression)~System.Double">
          <a class="xref" href="C1.WPF.Binding.Expression.op_Implicit.html#C1_WPF_Binding_Expression_op_Implicit_C1_WPF_Binding_Expression__System_Double">implicit operator double(Expression)</a>
        </td>
        <td class="markdown level1 summary"><p>Evaluates the expression and returns the result converted to a double.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Binding_Expression_op_Implicit_C1_WPF_Binding_Expression__System_String" data-uid="C1.WPF.Binding.Expression.op_Implicit(C1.WPF.Binding.Expression)~System.String">
          <a class="xref" href="C1.WPF.Binding.Expression.op_Implicit.html#C1_WPF_Binding_Expression_op_Implicit_C1_WPF_Binding_Expression__System_String">implicit operator string(Expression)</a>
        </td>
        <td class="markdown level1 summary"><p>Evaluates the expression and returns the result converted to a string.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
