[Mono-bugs] [Bug 24886] New - Type.FindMembers lacks support for events.
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
17 May 2002 18:36:56 -0000
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 miguel@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=24886
--- shadow/24886 Fri May 17 14:36:56 2002
+++ shadow/24886.tmp.2892 Fri May 17 14:36:56 2002
@@ -0,0 +1,49 @@
+Bug#: 24886
+Product: Mono/Runtime
+Version: unspecified
+OS: other
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: miguel@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Type.FindMembers lacks support for events.
+
+Compile the first program as a DLL:
+csc /target:lib.dll lib.cs
+
+public class X {
+
+ public delegate void A ();
+
+ public event A MyA;
+}
+
+Now, compile main program:
+csc prog.cs /r:lib.dll
+using System;
+using System.Reflection;
+
+class A {
+ public static void Main ()
+ {
+ Type t = typeof (X);
+
+ MemberInfo [] mi = t.FindMembers (
+ MemberTypes.Event, BindingFlags.Public | BindingFlags.Instance,
+ Type.FilterName, "MyA");
+
+ Console.WriteLine (" " + mi.Length);
+ }
+}
+
+The output should be `1', instead, it returns `0' with the Mono runtime.
+
+This is used by Gtk# extensively.