Method CombineArrays
CombineArrays<T>(T[]?, T[]?, T[]?)
Combines up to three arrays of type T into a single array.
public static T[] CombineArrays<T>(T[]? first, T[]? second = null, T[]? third = null)
Parameters
firstT[]The first array (required).
secondT[]The second array (optional, defaults to null).
thirdT[]The third array (optional, defaults to null).
Returns
- T[]
A new array containing all elements from the provided arrays in order.
Type Parameters
TThe type of elements in the arrays.
CombineArrays<T>(IEnumerable<T[]?>)
Combines multiple arrays of type T into a single array.
public static T[] CombineArrays<T>(IEnumerable<T[]?> arrays)
Parameters
arraysIEnumerable<T[]>A sequence of arrays to combine. Null arrays are skipped.
Returns
- T[]
A new array containing all elements from the provided arrays in order.
Type Parameters
TThe type of elements in the arrays.