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 [EMAIL PROTECTED]

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

--- shadow/80344        2006-12-23 20:02:30.000000000 -0500
+++ shadow/80344.tmp.5554       2006-12-24 05:25:53.000000000 -0500
@@ -58,6 +58,71 @@
 
 The real problem seems to be that MS.NET implies DeclaredOnly while
 Mono doesn't: if you change the flags to 
 Public | Instance | DeclaredOnly, the test case succeeds on both
 runtimes.
 
+
+------- Additional Comments From [EMAIL PROTECTED]  2006-12-24 05:25 -------
+I do not want to specify DeclaredOnly, this test case might clearify:
+
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+using System.Text;
+
+class Base {
+       public int P1 {get { return 1; }}
+       public int P2 {get { return 2; }}
+}
+
+class Derived : Base {
+       public new int P1 { get { return -1; }}
+       public new int GetHashCode () { }
+}
+
+
+class vbnc_bugs {
+       public const BindingFlags flags = BindingFlags.Public | 
+BindingFlags.Instance;
+       
+       static void Main ()
+       {
+               Type t = typeof(Derived);
+               MemberInfo [] members = t.GetMembers (flags);
+
+               foreach (MemberInfo m in members) {
+                       Console.WriteLine (m.MemberType.ToString () + 
+" " + m.DeclaringType.FullName + ":" + m.Name);
+               }
+       }
+}
+
+Output on MS:
+Method Derived:get_P1
+Method Derived:GetHashCode
+Method Base:get_P1
+Method Base:get_P2
+Method System.Object:GetType
+Method System.Object:ToString
+Method System.Object:Equals
+Method System.Object:GetHashCode
+Constructor Derived:.ctor
+Property Derived:P1
+Property Base:P2
+
+Output on Mono:
+Constructor Derived:.ctor
+Method Derived:get_P1
+Method Derived:GetHashCode
+Method Base:get_P1
+Method Base:get_P2
+Method System.Object:Equals
+Method System.Object:GetHashCode
+Method System.Object:GetType
+Method System.Object:ToString
+Property Derived:P1
+Property Base:P1
+Property Base:P2
+
+The property Base:P1 is returned on Mono, but not on MS. 
+Looks like MS won't return hidden base properties.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to