ArrayExtensions.Slice<T>
Extension Method in ArrayExtensions
Declaration
public static T[] Slice<T>(this T[] array, int amount)
Description
Returns a portion of the array containing a specified amount of elements.
Type Parameters
T | The type of the array. |
Parameters
array | The array to slice. |
amount | The amount of elements to slice. |
Returns
T[] | A new array containing only the sliced elements. |