Unsafe.BitCast<TFrom,TTo>(TFrom) Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Herinterpreteert de opgegeven waarde van het type TFrom als een waarde van het type TTo.
public:
generic <typename TFrom, typename TTo>
static TTo BitCast(TFrom source);
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 : allows ref struct where TTo : allows ref struct;
public static TTo BitCast<TFrom,TTo>(TFrom source) where TFrom : struct where TTo : struct;
static member BitCast : 'From -> 'o
static member BitCast : 'From -> 'o (requires 'From : struct and 'o : struct)
Public Shared Function BitCast(Of TFrom, TTo) (source As TFrom) As TTo
Public Shared Function BitCast(Of TFrom As Structure, TTo As Structure) (source As TFrom) As TTo
Type parameters
- TFrom
- TTo
Parameters
- source
- TFrom
Retouren
Een waarde van het type TTo.
Uitzonderingen
De grootte van TFrom en TTo zijn niet hetzelfde.