Changes the number of elements of an array to the specified new size.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax 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 Exception | Condition |
---|
ArgumentOutOfRangeException | newSize is less than zero. |
See Also