Unsafe.BitCast<TFrom,TTo>(TFrom) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Reinterprets the given value of type TFrom
as a value of 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);
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
Returns
TTo
A value of type TTo
.
Exceptions
The size of TFrom
and TTo
are not the same.
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET