[Mono-bugs] [Bug 76829][Nor] New - EventInfo.ReflectedType returns
declaring type instead
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sat Nov 26 16:52:12 EST 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 dean at brettle.com.
http://bugzilla.ximian.com/show_bug.cgi?id=76829
--- shadow/76829 2005-11-26 16:52:12.000000000 -0500
+++ shadow/76829.tmp.21549 2005-11-26 16:52:12.000000000 -0500
@@ -0,0 +1,68 @@
+Bug#: 76829
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: dean at brettle.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: EventInfo.ReflectedType returns declaring type instead
+
+Description of Problem:
+
+Here's a very small test case:
+
+using System;
+using System.Reflection;
+
+class Base
+{
+ public event EventHandler EventInBase;
+}
+
+class Derived : Base
+{
+ public event EventHandler EventInDerived;
+}
+
+class MainClass
+{
+ public static void Main(string[] args)
+ {
+ Derived o = new Derived();
+ Type t = o.GetType();
+ MemberInfo[] memberInfos = t.GetEvents();
+ foreach (MemberInfo mi in memberInfos)
+ {
+ Console.WriteLine(mi.Name + ": ReflectedType = " + mi.ReflectedType);
+ }
+ }
+}
+
+
+Actual Results:
+
+EventInDerived: ReflectedType = Derived
+EventInBase: ReflectedType = Base
+
+Expected Results:
+
+EventInDerived: ReflectedType = Base
+EventInBase: ReflectedType = Base
+
+
+How often does this happen?
+
+Everytime
+
+Additional Information:
+
+I'm running mono 1.1.10-2
More information about the mono-bugs
mailing list