ArraySectionTCast3DTFrom, TTo Method

Reinterprets this ArraySectionT as a three-dimensional CastArray2DTFrom, TTo struct, while its element type is cast from TFrom to TTo. This method can be used only when T in this ArraySectionT is a value type that contains no references.

Definition

Namespace: KGySoft.Collections
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public CastArray3D<TFrom, TTo> Cast3D<TFrom, TTo>(
	int depth,
	int height,
	int width
)
where TFrom : struct, new(), T
where TTo : struct, new()

Parameters

depth  Int32
The depth of the array to be returned.
height  Int32
The height of the array to be returned.
width  Int32
The width of the array to be returned.

Type Parameters

TFrom
The actual element type of this ArraySectionT. Must be the same as T.
TTo
The reinterpreted element type after casting.

Return Value

CastArray3DTFrom, TTo
A CastArray2DTFrom, TTo instance for this ArraySectionT.

See Also