DataTable dt = new DataTable(); string output = (dt.Compute("3 > 2", String.Empty)).ToString(); MessageBox.Show("Output is " + output);