Skip to content

C# Plus.NET Syntax Expression

ZZZ Projects edited this page Nov 16, 2015 · 3 revisions

Plus.NET Keyword:

  • Constant DateTime
  • Constant TimeSpan
  • Inner Expression
  • Recursive Lambda Expression

Constant DateTime

Allow to specify a DateTime Date Type from a string representation

DateTime result = Eval.Execute<DateTime>("#1981/04/13 10:10#");

Constant TimeSpan

Allow to specify a TimeSpan Data Type from a string reprensation

TimeSpan result = Eval.Execute<TimeSpan>("##10:10##");

Inner Expression

Allow to use an inner expression

var result = Eval.Execute("return 1 + { return 2 * 3 } + { 5 * 6}");

Recursive Lambda Expression

Allow to create a recursive lambda expression

var result = Eval.Execute<int>(@"
	Func<int, int> leonardo = fib(x) => { 
		return x > 2 ? fib(x - 1) + fib(x - 2) : 1; 
	};
	return leonardo(X)", new { X = 5 });