Click or drag to resize
ArrayResizeT Method
Changes the number of elements of an array to the specified new size.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static void Resize<T>(
	ref T[] array,
	int newSize
)

Parameters

array
Type: T
The one-dimensional, zero-based array to resize, or null to create a new array with the specified size.
newSize
Type: SystemInt32
The size of the new array.

Type Parameters

T
The type of the elements of the array.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionnewSize is less than zero.
See Also