title: How do I parse a string and get formula? in C#
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5838918/evaluate-c-string-with-math-operators">Evaluate C# string with math operators</a>  </p>
  </blockquote>
  
  
  
  <p>So lets say I have a basic string with the value "1*2+4"</p>
  
  <p>How would I go about parsing the information and then doing the calculation?</p>
  
  <p>I am self teaching c# but my assumption is this is a common issue in programming but without using a library how would one do this?</p>
  
  <p>My results so far have got me splitting the string up and putting them into an array of chars, but this is where I've stopped since I am trying to figure out how to compare chars to operators and chars to ints.</p>
  
  <p>I am not sure if I am going the right way about this but would be great if someone could point me in the right direction.</p>
  
  <p>Thank you for your help in advanced.</p>