[Mono-bugs] [Bug 40166][Wis] New - Array derived classes need a .ctor (Int32)
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Sun, 23 Mar 2003 10:13:51 -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=40166
--- shadow/40166 Sun Mar 23 10:13:51 2003
+++ shadow/40166.tmp.13311 Sun Mar 23 10:13:51 2003
@@ -0,0 +1,34 @@
+Bug#: 40166
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: gonzalo@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Array derived classes need a .ctor (Int32)
+
+A mail from Ian McLean in mono-devel-list says:
+
+When I interrogate an array type ( subtype of System.Array ) using
+reflection it appears to have no constructors. So the following code
+gets a single constructor on ms.net but none when run agains mono. It
+should have a single constructor taking an Int32 paramater so that you
+can do string[] foo = new string[12];
+
+Type arraytype = Type.GetType("System.String[]" );
+ConstructorInfo [] infos = arraytype.GetConstructors(
+ BindingFlags.Public | BindingFlags.Static |
+ BindingFlags.NonPublic | BindingFlags.Instance
+ );
+
+Console.WriteLine( "Type {0} has {1} constructors and its base class is
+{2}", arrayTypeName, infos.Length, arraytype.BaseType.ToString() );