public void GetBodyForDynamicMethod() { var dyna = new DynamicMethod("DynamicMethod", typeof(void), Type.EmptyTypes); dyna.il().ret(); var compiled = dyna.CreateDelegate(typeof(Action)); var method = compiled.Method; var owner = method.Get("m_owner").AssertCast<DynamicMethod>(); var ilgen = owner.GetILGenerator(); var ilBytes = ilgen.Get("m_ILStream").AssertCast<byte[]>(); ilBytes.AssertNotNull(); }