110,574
社区成员
发帖
与我相关
我的任务
分享
string fomula = "(1000 + 200) / 1000 * 2";
Object o = new DataTable().Compute(fomula,"");
double d;
if (Double.TryParse(o.ToString(), out d))
Console.WriteLine(d);
double ss = (1000 + 200) / 1000 * 2;
Console.WriteLine(ss);
static void Main(string[] args)
{
double ss = (1000 + 200) / 1000 * 2;
Console.WriteLine(ss);
string fomula = "(1000 + 200) / 1000 * 2";
double dd = (double)new System.Data.DataTable().Compute(fomula, "");
Console.WriteLine(dd);
Console.ReadLine();
}
static void Main(string[] args)
{
double ss = (1000 + 200) / 1000 * 2;
Console.WriteLine(ss);
string fomula = "(1000 + 200) / 1000 * 2";
double dd = (double)new DataTable().Compute(fomula, "");
Console.WriteLine(dd);
Console.ReadLine();
}