CastArray2DTFrom, TToSlice(Int32, Int32) Method

Gets a new CastArray2DTFrom, TTo instance, which represents a subrange of rows of the current instance starting with the specified startRowIndex and rowCount. Please note that the size of TTo multiplied by Width must be divisible by the size of TFrom.

Definition

Namespace: KGySoft.Collections
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public CastArray2D<TFrom, TTo> Slice(
	int startRowIndex,
	int rowCount
)

Parameters

startRowIndex  Int32
The offset that points to the first row of the returned CastArray2DTFrom, TTo.
rowCount  Int32
The desired number of rows of the returned Array2DT.

Return Value

CastArray2DTFrom, TTo
The subrange of rows of the current CastArray2DTFrom, TTo instance indicated by the specified startRowIndex and rowCount.

Exceptions

ArgumentOutOfRangeExceptionstartRowIndex or rowCount is out of range.
ArgumentExceptionThe size of TTo multiplied by Width is not divisible by the size of TFrom.

See Also