https://bugzilla.novell.com/show_bug.cgi?id=640702
https://bugzilla.novell.com/show_bug.cgi?id=640702#c0 Summary: MethodBase.GetCurrentMethod doesn't work inside a DynamicMethod Classification: Mono Product: Mono: Class Libraries Version: 2.8.x Platform: x86 OS/Version: Windows 7 Status: NEW Severity: Normal Priority: P5 - None Component: CORLIB AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0) Repro: using System; using System.Reflection; using System.Reflection.Emit; using System.Threading; public class Program { static void Main(string[] args) { DynamicMethod dm = new DynamicMethod("Foo", null, null); ILGenerator ilgen = dm.GetILGenerator(); ilgen.Emit(OpCodes.Call, typeof(MethodBase).GetMethod("GetCurrentMethod")); ilgen.Emit(OpCodes.Call, typeof(Console).GetMethod("WriteLine", new Type[] { typeof(object) })); ilgen.Emit(OpCodes.Ret); ThreadStart del = (ThreadStart)dm.CreateDelegate(typeof(ThreadStart)); del(); } } Reproducible: Always Steps to Reproduce: Compile and run repro Actual Results: Void Main(System.String[]) Expected Results: Void Foo() -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
