- 授权协议: BSD
- 开发语言: C#
- 操作系统: 跨平台
- 软件首页: http://csharpeval.codeplex.com/
软件介绍
Expression Evaluator 是一个轻量级的可以在运行时解析C#表达式的开源免费组件。表达式求值应该在很多地方使用,例如一些工资或者成本核算系统,就需要在后台动态配置计算表达式,从而进行计算求值。相比 NCal,还是这个 Expression Evaluator 比较强大,虽然部分功能有重叠。也都能计算常规的数学表达式。
Expression Evaluator 支持的特性有:
支持算术运算符,支持关系运算符,以及逻辑运算符
支持表达式分组和括号,以及递增递减运算符
支持表达式属性访问以及动态类型,支持字符串的+运算
支持数值类型的后缀d/f/m/l/u/ul、
支持隐式表达式,以及成员访问操作符(.)
支持一些默认的类型,如double, float, char, string, DateTime, Convert, Math
支持foreach循环
。。。等等,更多功能还期待你的使用和发现
简单的数值表达式就不演示了,看一个比较有新意的代码:
class MyClass
{
public string[] myExternalString;
public int x;
}
var v = new MyClass();
v.myExternalString = new string[] { "Hello", "there", "World!" };
v.x = 2;
//关键点,注册符号v
registry.RegisterSymbol("v", v);
//动态计算属性
//返回结果是"there",因为v.x=2,2/2=1,所以返回索引1的值
"v.myExternalString[v.x/2]"介绍 via cnblogs.com/asxinyu
Programming PHP
Rasmus Lerdorf、Kevin Tatroe、Peter MacIntyre / O'Reilly Media / 2006-5-5 / USD 39.99
Programming PHP, 2nd Edition, is the authoritative guide to PHP 5 and is filled with the unique knowledge of the creator of PHP (Rasmus Lerdorf) and other PHP experts. When it comes to creating websit......一起来看看 《Programming PHP》 这本书的介绍吧!
在线进制转换器
各进制数互转换器
UNIX 时间戳转换
UNIX 时间戳转换
