I Have a few lines of code
public void CreateMethod<TContract>(Expression<Action<TContract>> method)
{
var innerMethod = Builder.DefineMethod("SomeName",MethodAttributes.Private);
method.CompileToMethod(innerMethod);
//more code
}
However the second line fails. I've tried with different versions of DefineMethod with little luck. Any suggestions?