I have this TextBox where you can type in something like "1 + 2 + 3". I want the program to evaluate the answer (6 in this case) and assign it to a var. Then output the answer to a TextBlock. Tried the following but I'm getting a red underline under DataTable. It says 'DataTable' does not contain a constructor that takes 0 arguments
using System.Data;
private void ButtonCalculate_Click(object sender, RoutedEventArgs e)
{
string equation = textBoxEquation.Text;
var answer = new DataTable().Compute(equation, "");
textBlockAnswer.Text = answer;
}