Edit

Share via


ArrayExtensions Class

Definition

Helpers for working with arrays.

public static class ArrayExtensions
type ArrayExtensions = class
Public Module ArrayExtensions
Inheritance
ArrayExtensions

Methods

Fill<T>(T[,], T, Int32, Int32, Int32, Int32)

Fills elements of a rectangular array at the given position and size to a specific value. Ranges given will fill in as many elements as possible, ignoring positions outside the bounds of the array.

GetColumn<T>(T[,], Int32)

Yields a column from a rectangular array.

GetColumn<T>(T[][], Int32)

Yields a column from a jagged array. An exception will be thrown if the column is out of bounds, and return default in places where there are no elements from inner arrays. Note: There is no equivalent GetRow method, as you can use array[row] to retrieve.

GetRow<T>(T[,], Int32)

Yields a row from a rectangular array.

ToArrayString<T>(T[,])

Returns a simple string representation of a rectangular array.

ToArrayString<T>(T[])

Returns a simple string representation of an array.

ToArrayString<T>(T[][])

Returns a simple string representation of a jagged array.

Applies to