https://bugzilla.novell.com/show_bug.cgi?id=655439
https://bugzilla.novell.com/show_bug.cgi?id=655439#c0 Summary: Delegate.CreateDelegate is less strict than MS, but invocation is incorrect Classification: Mono Product: Mono: Class Libraries Version: SVN Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: CORLIB AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: Community User Blocker: --- Description of Problem: Delegate.CreateDelegate is less strict than MS. Consider the following: public static void Foo(params object[] args) { Console.WriteLine(args); } static void Main(string[] args) { var r = Delegate.CreateDelegate(typeof(Action), typeof(Program).GetMethod("Foo")) as Action; r(); } On MS, this fails with: Unhandled Exception: System.ArgumentException: Error binding to target method. at System.Delegate.CreateDelegate(Type type, MethodInfo method, Boolean throwOnBindFailure) at ConsoleApplication1.Program.Main(String[] args) On Mono it success, all good now, but when invoked (as in r()), 'null' is passed to the method, instead of new object[0]. Actual Results: 'param object[] args' is null Expected Results: 'param object[] args' is should be 'object[0]' -- 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
