CodeDom

时间:2017-07-17 10:11:13
【文件属性】:

文件名称:CodeDom

文件大小:4KB

文件格式:ZIP

更新时间:2017-07-17 10:11:13

CodeDom

CodeDom //Console.WriteLine("Test0: {0}", Evaluator.EvaluateToInteger("(30 + 4) * 2")); //Console.WriteLine("Test1: {0}", Evaluator.EvaluateToString(@"""Hello "" + ""There""")); //Console.WriteLine("Test2: {0}", Evaluator.EvaluateToBool("30 == 40")); //Console.WriteLine("Test3: {0}", Evaluator.EvaluateToObject("new DataSet()")); //Console.WriteLine("Test3: {0}", Evaluator.EvaluateToDouble("Math.PI")); //Console.WriteLine(); //EvaluatorItem[] items = { // new EvaluatorItem(typeof(int), "(30 + 4) * 2", "GetNumber"), // new EvaluatorItem(typeof(string), @"""Hello "" + ""There""", // "GetString"), // new EvaluatorItem(typeof(bool), "30 == 40", "GetBool"), // new EvaluatorItem(typeof(object), "new DataSet()", "GetDataSet") // }; //Evaluator eval = new Evaluator(items); //Console.WriteLine("TestStatic0: {0}", eval.EvaluateInt("GetNumber")); //Console.WriteLine("TestStatic1: {0}", eval.EvaluateString("GetString")); //Console.WriteLine("TestStatic2: {0}", eval.EvaluateBool("GetBool")); //Console.WriteLine("TestStatic3: {0}", eval.Evaluate("GetDataSet"));


【文件预览】:
新建文件夹
----Evaluator.cs(11KB)
----Program.cs(3KB)

网友评论