 | columnsColumnsT Method |
Returns the 2D
Array arranged as an
IListT of
IListT, with the second dimension first.
Namespace:
WhetStone.Looping
Assembly:
WhetStone (in WhetStone.dll) Version: 1.0.4.0 (1.0.0.0)
Syntaxpublic 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:
IListIListTAn
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).
Examplesvar arr = new int[,]{{0,1,2,3},{4,5,6,7},{8,9,10,11}};
arr.Columns().Select(a=>a.ToArray()).ToArray();
See Also