Share via


Array.CreateInstance Method

Creates a one-dimensional array of the specified type and length, with zero-based indexing.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

[MethodImplAttribute]
public static Array CreateInstance (
         Type elementType,
         int length
)

Parameters

  • elementType
    The type of array you want to create.
  • length
    The size of the array you want to create.

Return Value

A new one-dimensional array of the specified type and with the specified length, with zero-based indexing.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, 4.1, and 4.2.

See Also

Reference

Array Class
Array Members
System Namespace