首页  编辑  

使用ScriptControl计算表达式

Tags: /C#/其他技巧/   Date Created:

//Script Control 1.0

using MSScriptControl ;

ScriptControl vScriptControl = new ScriptControl ();

vScriptControl . Language = "JavaScript" ;

Text = vScriptControl . Eval( "'Zswang + (1 + 2)" ) . ToString();