I want to create a delegate type in C# inside a method for the purpose of creating Anonymous methods.
For example:
public void MyMethod(){ delegat
What about this:
static void Main(string[] args) { Expression> exFunc = (a, b) => a + b; var lambda = exFunc as LambdaExpression; Delegate del = exFunc.Compile(); Console.WriteLine(del.DynamicInvoke(2, 2)); }