.NET 4.5 MethodBuilder.SetMethodBody
In the newest version of the .NET framework, version 4.5, the MethodBuilder class has a method called SetMethodBody that I believe is exactly what I'm looking at as an alternative to using ILGenerator (which is annoying and limited in odd ways). The documentation can be found here , although since .NET 4.5 is not out yet, it is not fully documented. I can supply all but two of the arguments, but the rest I will need help with. The first that I don't understand is byte[] localSignature , the third argument. MSDN states that it is "An array of bytes that contain the serialized local variable