Summary
If the `array` is null or its length isn't equal to the specified `size` this method allocates a new array
of that `size`, otherwise it just returns the `array`. Unlike
System.Array.Resize``1(``0[]@,System.Int32)
this method does
not copy the elements from the old array into the new one.
- Assembly
- Weaver
.dll - Namespace
- Weaver
- Containing Type
- WeaverUtilities
Syntax
public static T[] SetSize<T>(T[] array, int size)
Type Parameters
Name | Description |
---|---|
T |
Parameters
Name | Type | Description |
---|---|---|
array | T[] | |
size | int |
Return Value
Type | Description |
---|---|
T[] |