[Mono-devel-list] array type constructors
Gonzalo Paniagua Javier
gonzalo at ximian.com
Sun Mar 23 10:16:41 EST 2003
El dom, 23 de 03 de 2003 a las 15:37, Ian MacLean escribió:
> 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() );
I've filled http://bugzilla.ximian.com/show_bug.cgi?id=40166 with the
information you provided.
-Gonzalo
More information about the Mono-devel-list
mailing list