Click or drag to resize

columnsColumnsT Method

Namespace:  WhetStone.Looping
Assembly:  WhetStone (in WhetStone.dll) Version: 1.0.4.0 (1.0.0.0)
Syntax
C#
public static IList<IList<T>> Columns<T>(
	this T[,] this
)

Parameters

this
Type: T
The Array to transform.

Type Parameters

T
The type of the Array.

Return Value

Type: IListIListT
An IListT of IListT, each element of the super-list containing a second-dimension slice of the original Array.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Examples
var arr = new int[,]{{0,1,2,3},{4,5,6,7},{8,9,10,11}};
arr.Columns().Select(a=>a.ToArray()).ToArray(); //int[,] {{0,4,8},{1,5,9},{2,6,10},{3,7,11}}
See Also