[Mono-bugs] [Bug 74947][Wis] New - InvokeMember, CreateInstance and boxed param

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat May 14 15:17:50 EDT 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by bmaurer at users.sf.net.

http://bugzilla.ximian.com/show_bug.cgi?id=74947

--- shadow/74947	2005-05-14 15:17:50.000000000 -0400
+++ shadow/74947.tmp.24482	2005-05-14 15:17:50.000000000 -0400
@@ -0,0 +1,44 @@
+Bug#: 74947
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: bmaurer at users.sf.net               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: InvokeMember, CreateInstance and boxed param
+
+using System;
+using System.Reflection;
+
+public class A
+{
+	public A (IComparable value)
+	{
+	}
+	
+	static void Main(string[] args)
+	{
+		Type typeA = typeof(A);
+		object[] invokeargs = {1};
+		A objA = (A)typeA.InvokeMember( "", 
+		BindingFlags.DeclaredOnly |
+		BindingFlags.Public |
+		BindingFlags.NonPublic |
+		BindingFlags.Instance |
+		BindingFlags.CreateInstance,
+		null, null, invokeargs 
+		);
+	}
+}  
+
+Doesn't work. It works fine if you don't try to box a value type into an
+interface.


More information about the mono-bugs mailing list