In this example:
class Example
{
public Example()
{
DoSomething(() => Callback);
}
void DoSomething(Expression<Func<Action<string>>> expression) { }
void Callback(string s) { }
}
How do I create () => Callback programmatically, assuming I have its MethodInfo. The debugger shows it as:
{() => Convert(Void Callback(System.String).CreateDelegate(System.Action`1[System.String], value(Example)), Action`1)}
I tried an Expression.Call within an Expression.Convert within an Expression.Lambda, but I can't get the delegate part right.