[Mono-bugs] [Bug 79023][Wis] New - Type.InvokeMember does not accept (BindingFlags.SetField | BindingFlags.SetProperty)
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sun Aug 6 22:21:47 EDT 2006
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 rodrigobamboo at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=79023
--- shadow/79023 2006-08-06 22:21:47.000000000 -0400
+++ shadow/79023.tmp.1186 2006-08-06 22:21:47.000000000 -0400
@@ -0,0 +1,45 @@
+Bug#: 79023
+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: rodrigobamboo at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Type.InvokeMember does not accept (BindingFlags.SetField | BindingFlags.SetProperty)
+
+The MS.NET implementation has no problem with both flags being specified
+together, it means either SetField if the member is a field or SetProperty
+if it is a property.
+
+using System;
+using System.Collections;
+using System.Reflection;
+
+public class Program
+{
+ public static void Main(string[] args)
+ {
+ ArrayList list = new ArrayList();
+ list.Add("foo");
+ list.GetType().InvokeMember(
+ "Item",
+
+BindingFlags.SetField|BindingFlags.SetProperty|BindingFlags.Instance|BindingFlags.Public,
+ null,
+ list,
+ new object[] { 0, "bar" });
+ if (!object.Equals("bar", list[0]))
+ {
+ throw new ApplicationException();
+ }
+ }
+}
More information about the mono-bugs
mailing list