https://bugzilla.novell.com/show_bug.cgi?id=366400
User [EMAIL PROTECTED] added comment https://bugzilla.novell.com/show_bug.cgi?id=366400#c2 Gert Driesen <[EMAIL PROTECTED]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[EMAIL PROTECTED] Status|RESOLVED |REOPENED Resolution|FIXED | --- Comment #2 from Gert Driesen <[EMAIL PROTECTED]> 2008-03-02 05:58:32 MST --- Zoltan, MS does appear to allow callvirt with static methods and before r97095 this also worked on Mono for other cases: using System; using System.Reflection; using System.Reflection.Emit; class Program { public delegate int BodyDelegate (); static void Main (string [] args) { DynamicMethod method = new DynamicMethod ("GetInt", typeof (int), Type.EmptyTypes, typeof (Program).Module); ILGenerator generator = method.GetILGenerator (); MethodInfo parse = typeof (Int32).GetMethod ("Parse", new Type [] { typeof (string) }); generator.Emit (OpCodes.Ldstr, "555"); generator.EmitCall (OpCodes.Callvirt, parse, null); generator.Emit (OpCodes.Ret); BodyDelegate del = (BodyDelegate) method.CreateDelegate (typeof (BodyDelegate)); Console.WriteLine (del ()); } } Note: I'm not saying our behavior is wrong; it just differs from that of MS. -- 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
