ArraySectionTCast2DTFrom, TTo Method
Reinterprets this
ArraySectionT as a two-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.
Namespace: KGySoft.CollectionsAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
public CastArray2D<TFrom, TTo> Cast2D<TFrom, TTo>(
int height,
int width
)
where TFrom : struct, new(), T
where TTo : struct, new()
Public Function Cast2D(Of TFrom As {Structure, New, T}, TTo As {Structure, New}) (
height As Integer,
width As Integer
) As CastArray2D(Of TFrom, TTo)
public:
generic<typename TFrom, typename TTo>
where TFrom : value class, gcnew(), T
where TTo : value class, gcnew()
CastArray2D<TFrom, TTo> Cast2D(
int height,
int width
)
member Cast2D :
height : int *
width : int -> CastArray2D<'TFrom, 'TTo> when 'TFrom : struct, new() and 'T when 'TTo : struct, new()
- height Int32
- The height of the array to be returned.
- width Int32
- The width of the array to be returned.
- TFrom
- The actual element type of this ArraySectionT. Must be the same as T.
- TTo
- The reinterpreted element type after casting.
CastArray2DTFrom,
TToA
CastArray2DTFrom, TTo instance for this
ArraySectionT.