CastArray3DTFrom, TToSlice(Int32, Int32) Method

Gets a new CastArray3DTFrom, TTo instance, which represents a subrange of planes of the current instance starting with the specified startPlaneIndex and planeCount. Please note that the size of TTo multiplied by Width times Height 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 CastArray3D<TFrom, TTo> Slice(
	int startPlaneIndex,
	int planeCount
)

Parameters

startPlaneIndex  Int32
The offset that points to the first plane of the returned CastArray3DTFrom, TTo.
planeCount  Int32
The desired number of planes of the returned CastArray3DTFrom, TTo.

Return Value

CastArray3DTFrom, TTo
The subrange of planes of the current CastArray3DTFrom, TTo instance indicated by the specified startPlaneIndex and planeCount.

Exceptions

ArgumentOutOfRangeExceptionstartPlaneIndex or planeCount is out of range.
ArgumentExceptionThe size of TTo multiplied by Width times Height is not divisible by the size of TFrom.

See Also