Version 2.1.0.0

MultiDimArrayUtilities class

Namespace: Sirenix.Utilities
Assembly: Sirenix.Utilities
public static class MultiDimArrayUtilities
Contains utilities for operating on arrays multi-dimentional arrays.
Inheritance
  • System.Object
  • MultiDimArrayUtilities

Methods

DeleteColumn<TElement>(TElement[,], Int32)
Deletes a column.
public static TElement[, ] DeleteColumn<TElement>(TElement[, ] array, int columnIndex)
Parameters
TElement[,] array

The array.

System.Int32 columnIndex

Index of the column.

Returns
TElement[,]

Type Parameters
TElement

The type of the element.

DeleteRow<TElement>(TElement[,], Int32)
Deletes the row.
public static TElement[, ] DeleteRow<TElement>(TElement[, ] array, int rowIndex)
Parameters
TElement[,] array

The array.

System.Int32 rowIndex

Index of the row.

Returns
TElement[,]

Type Parameters
TElement

The type of the element.

DuplicateColumn<TElement>(TElement[,], Int32)
Duplicates the column.
public static TElement[, ] DuplicateColumn<TElement>(TElement[, ] array, int columnIndex)
Parameters
TElement[,] array

The array.

System.Int32 columnIndex

Index of the column.

Returns
TElement[,]

Type Parameters
TElement

The type of the element.

DuplicateRow<TElement>(TElement[,], Int32)
Duplicates the row.
public static TElement[, ] DuplicateRow<TElement>(TElement[, ] array, int rowIndex)
Parameters
TElement[,] array

The array.

System.Int32 rowIndex

Index of the row.

Returns
TElement[,]

Type Parameters
TElement

The type of the element.

InsertOneColumnLeft<TElement>(TElement[,], Int32)
Inserts one column left of the specified column index.
public static TElement[, ] InsertOneColumnLeft<TElement>(TElement[, ] array, int columnIndex)
Parameters
TElement[,] array

The array.

System.Int32 columnIndex

Index of the column.

Returns
TElement[,]

Type Parameters
TElement

The type of the element.

InsertOneColumnRight<TElement>(TElement[,], Int32)
Inserts one column right of the specified column index.
public static TElement[, ] InsertOneColumnRight<TElement>(TElement[, ] arr, int columnIndex)
Parameters
TElement[,] arr

The arr.

System.Int32 columnIndex

Index of the column.

Returns
TElement[,]

Type Parameters
TElement

The type of the element.

InsertOneRowAbove<TElement>(TElement[,], Int32)
Inserts one row above the specified row index.
public static TElement[, ] InsertOneRowAbove<TElement>(TElement[, ] array, int rowIndex)
Parameters
TElement[,] array

The array.

System.Int32 rowIndex

The row index.

Returns
TElement[,]

Type Parameters
TElement

The type of the element.

InsertOneRowBelow<TElement>(TElement[,], Int32)
Inserts one row below the specified row index.
public static TElement[, ] InsertOneRowBelow<TElement>(TElement[, ] array, int rowIndex)
Parameters
TElement[,] array

The array.

System.Int32 rowIndex

Index of the row.

Returns
TElement[,]

Type Parameters
TElement

The type of the element.

MoveColumn<TElement>(TElement[,], Int32, Int32)
Moves a column.
public static TElement[, ] MoveColumn<TElement>(TElement[, ] array, int fromColumn, int toColumn)
Parameters
TElement[,] array

The array.

System.Int32 fromColumn

From column.

System.Int32 toColumn

To column.

Returns
TElement[,]

Type Parameters
TElement

The type of the element.

MoveRow<TElement>(TElement[,], Int32, Int32)
Moves a row.
public static TElement[, ] MoveRow<TElement>(TElement[, ] array, int fromRow, int toRow)
Parameters
TElement[,] array

The array.

System.Int32 fromRow

From row.

System.Int32 toRow

To row.

Returns
TElement[,]

Type Parameters
TElement

The type of the element.