I can define a func with a lambda expression as in:
Func <int, int, int> Fxy = ( (a,b) => a + b ) ); // Fxy does addition
But what if I wanted to allow the user to supply the r.h.s. of the lambda expression at runtime ?
String formula_rhs = Console.Readline();
// user enters "a - b"
Can I somehow modify Fxy as if I had coded
Func <int, int, int> Fxy = ( (a,b) => a - b ) ); // Fxy does what the user wants
// (subtraction)
I presently use a home built expression parser to accept user-defined formulas. Just starting up w .NET, and I get the feeling there may be a not-too-painful way to do this.