J
John Spiegel
Hi all,
Is it possible to have an uncompiled C# expression evaluated at runtime?
I'd like to store an expression within an XML file then evaluate it when the
time comes, something like:
MyExpression = "DateTime.Today.Month % 2) = 0?"Even\":\"Odd\"";
string strResultString = MyExpression.Evaluate();
where MyExpression.Evaluate() represents a method that would evaluate the
text as a command, returning "Odd" (this month) to the strResultString.
Is something like this possible?
Is it possible to have an uncompiled C# expression evaluated at runtime?
I'd like to store an expression within an XML file then evaluate it when the
time comes, something like:
MyExpression = "DateTime.Today.Month % 2) = 0?"Even\":\"Odd\"";
string strResultString = MyExpression.Evaluate();
where MyExpression.Evaluate() represents a method that would evaluate the
text as a command, returning "Odd" (this month) to the strResultString.
Is something like this possible?