[Mono-bugs] [Bug 37381][Nor] New - Type.GetMethods return

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Wed, 29 Jan 2003 12:49:37 -0500 (EST)


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 gonzalo@ximian.com.

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

--- shadow/37381	Wed Jan 29 12:49:37 2003
+++ shadow/37381.tmp.15347	Wed Jan 29 12:49:37 2003
@@ -0,0 +1,69 @@
+Bug#: 37381
+Product: Mono/Class Libraries
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gonzalo@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Type.GetMethods return
+
+Test case from Zoltan:
+
+using System;
+using System.Reflection;
+
+[AttributeUsage(AttributeTargets.Method, AllowMultiple=false)]
+        public sealed class SetUpAttribute : Attribute {
+}
+
+class Foo {
+
+        [SetUpAttribute]
+        protected virtual void foo () {
+        }
+}
+
+class Bar : Foo {
+        protected override void foo () {
+        }
+}
+
+class Bug {
+        static public void Main() {
+                foreach (MethodInfo method in
+typeof(Bar).GetMethods(BindingFlags.Public|BindingFlags.Instance|BindingFlags.NonPublic))
+{
+			Console.WriteLine (method);
+                }
+        }
+}
+
+This prints on MS:
+Void foo()
+Void Finalize()
+Int32 GetHashCode()
+Boolean Equals(System.Object)
+System.String ToString()
+System.Type GetType()
+System.Object MemberwiseClone()
+
+While under mono:
+Void FieldSetter(String, String, Object)
+Void FieldGetter(String, String, Object)
+IntPtr obj_address()
+String ToString()
+Object MemberwiseClone()
+Type GetType()
+Int32 GetHashCode()
+Void Finalize()
+Boolean Equals(Object)
+Void foo()