Share via


Unsafe.BitCast<TFrom,TTo>(TFrom) Methode

Definition

Interpretiert den angegebenen Wert des Typs TFrom als Wert des Typs TToneu.

public:
generic <typename TFrom, typename TTo>
 where TFrom : value class where TTo : value class static TTo BitCast(TFrom source);
public static TTo BitCast<TFrom,TTo> (TFrom source) where TFrom : struct where TTo : struct;
static member BitCast : 'From -> 'o (requires 'From : struct and 'o : struct)
Public Shared Function BitCast(Of TFrom As Structure, TTo As Structure) (source As TFrom) As TTo

Typparameter

TFrom
TTo

Parameter

source
TFrom

Gibt zurück

TTo

Ein Wert vom Typ TTo.

Ausnahmen

Die Größe von TFrom und TTo ist nicht gleich.

Gilt für: