[Mono-bugs] [Bug 64191][Nor] New - EventInfo.GetAddMethod
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 26 Aug 2004 14:00:11 -0400 (EDT)
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 marek.safar@seznam.cz.
http://bugzilla.ximian.com/show_bug.cgi?id=64191
--- shadow/64191 2004-08-26 14:00:10.000000000 -0400
+++ shadow/64191.tmp.21559 2004-08-26 14:00:10.000000000 -0400
@@ -0,0 +1,60 @@
+Bug#: 64191
+Product: Mono: Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: marek.safar@seznam.cz
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: EventInfo.GetAddMethod
+
+Description of Problem:
+
+This sample prints ERROR which is the error because event is private and
+for obtaining "add method" must be used GetAddMethod (true).
+The same bug contains GetRemoveMethod.
+
+Steps to reproduce the problem:
+
+
+using System.Reflection;
+using System;
+
+public class QtSupport
+{
+ private static event MousePressEvent mousePressEvent;
+ private delegate void MousePressEvent ();
+}
+
+public class C
+{
+ public static void Main ()
+ {
+ EventInfo[] events = typeof (QtSupport).GetEvents
+(BindingFlags.NonPublic | BindingFlags.Static);
+
+ if (events[0].GetAddMethod () != null)
+ Console.WriteLine ("ERROR");
+
+ }
+}
+Actual Results:
+
+ERROR
+
+Expected Results:
+
+no output
+
+How often does this happen?
+
+
+Additional Information: