Skip to content

C# Plus.NET Syntax Operator

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

Plus.NET Keyword:

  • Array Implicit ..
  • Exclusive-OR - Alternative ^|
  • Exclusive-OR Assignation - Alternative ^|=
  • Exponent ^^
  • Exponent Assignation ^^=
  • Not Equals - Alternative <>

Array Implicit ...

Declare an implicit array that can be used in a constructor

var result = Eval.Execute("var list = new List<int>() { 1, 2..100 };")

Exclusive-OR - Alternative ^|

The exclusive-OR assignment operator. Same as '^' operator.

var result = Eval.Execute("true ^| false")

All Eval Projects has a UseCaretForExponent property to use '^' and '^=' operator for exponent. Exclusive-OR alternative can always be used '^|', '^|='

Exclusive-OR Assignation - Alternative ^|=

The exclusive-OR assignment operator. Same as '^=' operator

var result = Eval.Execute("
	bool b = true;
	b ^|= false;
	return b;")

All Eval Projects has a UseCaretForExponent property to use '^' and '^=' operator for exponent. Exclusive-OR alternative can always be used '^|', '^|='

Exponent ^^

Raises a number to the power of another number.

The result is always a double.

var result = Eval.Execute("2^^3") // return 8

All Eval Projects has a UseCaretForExponent property to use '^' and '^=' operator for exponent. Exclusive-OR alternative can always be used '^|', '^|='

Exponent Assignation ^^=

Raises the value of a variable or property to the power of an expression and assigns the result back to the variable or property.

The result is always a double.

var result = Eval.Execute("
	var x = 2;
	x ^^=3;
	return x;") // return 8

All Eval Projects has a UseCaretForExponent property to use '^' and '^=' operator for exponent. Exclusive-OR alternative can always be used '^|', '^|='

Not Equals - Alternative <>

**The inequality operator (similar as !=) returns false if its operands are equal, true otherwise.

var result = Eval.Execute("2 + 2 <> 4");