打印本文 打印本文  关闭窗口 关闭窗口  
C#基础C#中的eval()函数
作者:佚名  文章来源:不详  点击数  更新时间:2008/10/22 21:29:43  文章录入:杜斌  责任编辑:杜斌

  可以这样说,绝大多数的大型网站都会用到eval()函数,虽然一直在用,但其具体含义及使用还真没特别去注意过,搜索了下也没有什么明确的解释。
  翻译过来的中文释义大体如下:
  C# eval ()函数,是一个用来求值的解析表达式,支持布尔型(Boolean),二进制方式,算法,一元,所属,
  成员(例如:object.property 对象属性),索引值(数组索引);条件函数,也支持变量赋值。
  考试大提示:其有点在于:
  无需运行时编译;
  无需使用JScript.NET;
  无需使用数据表。
  英文如下:
  C# eval function
  parse expression and evaluate it. Supports Boolean, Bitwise, Arithmetic, Unary, Paren, Member (such as object.property ), Indexer (such as array[index]) and ConditionalIf(?:), also supports Variable assign.
  you can use it like evaluate one statement C# source code.
  not use runtime Compiler.
  not use JScript.NET.
  not use DataTable
打印本文 打印本文  关闭窗口 关闭窗口