Click or drag to resize
ArrayCreateInstance Method (Type, Int32, Int32, Int32)
Creates a three-dimensional Array of the specified Type and dimension lengths, with zero-based indexing.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static Array CreateInstance(
	Type elementType,
	int length1,
	int length2,
	int length3
)

Parameters

elementType
Type: SystemType
The Type of the Array to create.
length1
Type: SystemInt32
The size of the first dimension of the Array to create.
length2
Type: SystemInt32
The size of the second dimension of the Array to create.
length3
Type: SystemInt32
The size of the third dimension of the Array to create.

Return Value

Type: Array
A new three-dimensional Array of the specified Type with the specified length for each dimension, using zero-based indexing.
Exceptions
ExceptionCondition
ArgumentNullExceptionelementType is null.
ArgumentExceptionelementType is not a valid Type.
NotSupportedExceptionelementType is not supported. For example, Void is not supported. -or-elementType is an open generic type.
ArgumentOutOfRangeExceptionlength1 is less than zero.-or-length2 is less than zero.-or-length3 is less than zero.
See Also