ArrayExtensions.Flatten<T>

Extension Method in ArrayExtensions

Declaration

public static T[] Flatten<T>(this T[, ] array)

Description

Flattens a two-dimensional array into a new one-dimensional array.

Type Parameters

TThe type of the array.

Parameters

arrayThe two-dimensional array to flatten.

Returns

T[]A new array with the flattened elements.

Overload

Declaration

public static T[] Flatten<T>(this T[,, ] array)

Description

Flattens a three-dimensional array into a new one-dimensional array.

Type Parameters

TThe type of the array.

Parameters

arrayThe three-dimensional array to flatten.

Returns

T[]A new array with the flattened elements.