Method BitCast
BitCast<TFrom, TTo>(TFrom)
Reinterprets the given value of type TFrom
as a value of type TTo
.
public static TTo BitCast<TFrom, TTo>(TFrom source)
Parameters
source
TFrom
Returns
- TTo
Type Parameters
TFrom
TTo
Exceptions
- NotSupportedException
The sizes of
TFrom
andTTo
are not the same or the type parameters are not structs.