[Mono-bugs] [Bug 520690] New: using Reflection to Invoke methods with out params throws 'MissingMethodExp 2'. .NET difference

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jul 9 12:08:15 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=520690


           Summary: using Reflection to Invoke methods with out params
                    throws 'MissingMethodExp 2'. .NET difference
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: i686
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: tom_hindle at sil.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=304143)
 --> (http://bugzilla.novell.com/attachment.cgi?id=304143)
Test case showing problem with Reflection invoke on method with out parameter

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11)
Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11

I have a method defined like:
private DateTime GetLastRunInfoForCheck(Guid checkId, out string[] bookChkInfo)

When I attempt to invoke it with reflection It throws a MissingMethodExp.

If I remove the out param it works as expected.

The attached test case works in .NET.


Reproducible: Always

Steps to Reproduce:
1. compile and run Test program
2.
3.
Actual Results:  
MissingMethodExp 2

Unhandled Exception: System.MissingMethodException: The best match for method
GetLastRunInfoForCheck has some invalid parameter.
  at System.MonoType.InvokeMember (System.String name, BindingFlags invokeAttr,
System.Reflection.Binder binder, System.Object target, System.Object[] args,
System.Reflection.ParameterModifier[] modifiers,
System.Globalization.CultureInfo culture, System.String[] namedParameters)
[0x00655] in /home/hindlet/src/monosvn/mcs/class/corlib/System/MonoType.cs:514 
  at System.Type.InvokeMember (System.String name, BindingFlags invokeAttr,
System.Reflection.Binder binder, System.Object target, System.Object[] args)
[0x00000] in /home/hindlet/src/monosvn/mcs/class/corlib/System/Type.cs:1146 
  at ConsoleApplication8.Program.Main (System.String[] args) [0x00091] in
/home/hindlet/TestReflection/TestReflection/Main.cs:47 



Expected Results:  
04/03/2009 3:16:17 PM

-- 
Configure bugmail: http://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.


More information about the mono-bugs mailing list