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
sourceTFrom
Returns
- TTo
Type Parameters
TFromTTo
Exceptions
- NotSupportedException
The sizes of
TFromandTToare not the same or the type parameters are not structs.