Array.CreateInstance Method (Type, Int32)
Assembly: mscorlib (in mscorlib.dll)
static member CreateInstance : elementType:Type * [<ParamArrayAttribute>] lengths:int -> Array
elementType is null.
lengths is null.
elementType is not a valid Type.
The lengths array contains less than one element.
elementType is not supported. For example, Void is not supported.
elementType is an open generic type.
Any value in lengths is less than zero.
The number of elements in the lengths array must equal the number of dimensions in the new Array. Each element of the lengths array must specify the length of the corresponding dimension in the new Array.
Reference-type elements are initialized to null. Value-type elements are initialized to zero.
This method is an O(n) operation, where n is the product of all values in lengths.
Available since 8
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 8.1