title: How to create dynamic mathematical function?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/53844/how-can-i-evaluate-a-c-sharp-expression-dynamically">How can I evaluate a C# expression dynamically?</a>  </p>
  </blockquote>
  
  
  
  <p>I can do this;</p>
  
  <pre><code>int x = 6;
  var result = new DataTable().Compute(x + " * 10 / 3", null);
  </code></pre>
  
  <p>And this;</p>
  
  <pre><code>public delegate double function(double x);
  function func = delegate(double x) { return x * 10 / 3; };
  </code></pre>
  
  <p>So how can i compute like first example and assign it to a delegate like second example?</p>
  
  <p>The goal is doing compute work only once, then use it with many variables.</p>