Half.Explicit Operator
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.
Overloads
Explicit(Half to UInt32) 
Explicitly converts a halfprecision floatingpoint value to its nearest representable UInt32 value. 
Explicit(Half to UInt64) 
Explicitly converts a halfprecision floatingpoint value to its nearest representable UInt64 value. 
Explicit(Half to UIntPtr) 
Explicitly converts a halfprecision floatingpoint value to its nearest representable UIntPtr value. 
Explicit(Int16 to Half) 
Explicitly converts a Int16 value to its nearest representable halfprecision floatingpoint value. 
Explicit(Int32 to Half) 
Explicitly converts a Int32 value to its nearest representable halfprecision floatingpoint value. 
Explicit(Int64 to Half) 
Explicitly converts a Int64 value to its nearest representable halfprecision floatingpoint value. 
Explicit(UInt64 to Half) 
Explicitly converts a UInt64 value to its nearest representable halfprecision floatingpoint value. 
Explicit(Single to Half)  
Explicit(UInt16 to Half) 
Explicitly converts a UInt16 value to its nearest representable halfprecision floatingpoint value. 
Explicit(UInt32 to Half) 
Explicitly converts a UInt32 value to its nearest representable halfprecision floatingpoint value. 
Explicit(Half to UInt16) 
Explicitly converts a halfprecision floatingpoint value to its nearest representable UInt16 value. 
Explicit(UIntPtr to Half) 
Explicitly converts a UIntPtr value to its nearest representable halfprecision floatingpoint value. 
Explicit(IntPtr to Half) 
Explicitly converts a IntPtr value to its nearest representable halfprecision floatingpoint value. 
Explicit(Half to UInt128) 
Explicitly converts a halfprecision floatingpoint value to its nearest representable UInt128. 
Explicit(Double to Half)  
Explicit(Half to SByte) 
Explicitly converts a halfprecision floatingpoint value to its nearest representable SByte value. 
Explicit(Char to Half) 
Explicitly converts a Char value to its nearest representable halfprecision floatingpoint value. 
Explicit(Decimal to Half) 
Explicitly converts a Decimal value to its nearest representable halfprecision floatingpoint value. 
Explicit(Half to Single)  
Explicit(Half to Byte) 
Explicitly converts a halfprecision floatingpoint value to its nearest representable Byte value. 
Explicit(Half to Decimal) 
Explicitly converts a halfprecision floatingpoint value to its nearest representable Decimal value. 
Explicit(Half to Char) 
Explicitly converts a halfprecision floatingpoint value to its nearest representable Char value. 
Explicit(Half to Int128) 
Explicitly converts a halfprecision floatingpoint value to its nearest representable Int128. 
Explicit(Half to Int16) 
Explicitly converts a halfprecision floatingpoint value to its nearest representable Int16 value. 
Explicit(Half to Int32) 
Explicitly converts a halfprecision floatingpoint value to its nearest representable Int32 value. 
Explicit(Half to Int64) 
Explicitly converts a halfprecision floatingpoint value to its nearest representable Int64 value. 
Explicit(Half to IntPtr) 
Explicitly converts a halfprecision floatingpoint value to its nearest representable IntPtr value. 
Explicit(Half to Double) 
Explicit(Half to UInt32)
Important
This API is not CLScompliant.
Explicitly converts a halfprecision floatingpoint value to its nearest representable UInt32 value.
public:
static explicit operator System::UInt32(Half value);
[System.CLSCompliant(false)]
public static explicit operator uint (Half value);
[<System.CLSCompliant(false)>]
static member op_Explicit : Half > uint32
Public Shared Narrowing Operator CType (value As Half) As UInteger
Parameters
 value
 Half
The value to convert.
Returns
value
converted to its nearest representable UInt32 value.
 Attributes
Applies to
Explicit(Half to UInt64)
Important
This API is not CLScompliant.
Explicitly converts a halfprecision floatingpoint value to its nearest representable UInt64 value.
public:
static explicit operator System::UInt64(Half value);
[System.CLSCompliant(false)]
public static explicit operator ulong (Half value);
[<System.CLSCompliant(false)>]
static member op_Explicit : Half > uint64
Public Shared Narrowing Operator CType (value As Half) As ULong
Parameters
 value
 Half
The value to convert.
Returns
value
converted to its nearest representable UInt64 value.
 Attributes
Applies to
Explicit(Half to UIntPtr)
Important
This API is not CLScompliant.
Explicitly converts a halfprecision floatingpoint value to its nearest representable UIntPtr value.
public:
static explicit operator UIntPtr(Half value);
[System.CLSCompliant(false)]
public static explicit operator UIntPtr (Half value);
[<System.CLSCompliant(false)>]
static member op_Explicit : Half > unativeint
Public Shared Narrowing Operator CType (value As Half) As UIntPtr
Parameters
 value
 Half
The value to convert.
Returns

UIntPtr
unativeint
value
converted to its nearest representable UIntPtr value.
 Attributes
Applies to
Explicit(Int16 to Half)
Explicitly converts a Int16 value to its nearest representable halfprecision floatingpoint value.
public:
static explicit operator Half(short value);
public static explicit operator Half (short value);
static member op_Explicit : int16 > Half
Public Shared Narrowing Operator CType (value As Short) As Half
Parameters
 value
 Int16
The value to convert.
Returns
value
converted to its nearest representable halfprecision floatingpoint value.
Applies to
Explicit(Int32 to Half)
Explicitly converts a Int32 value to its nearest representable halfprecision floatingpoint value.
public:
static explicit operator Half(int value);
public static explicit operator Half (int value);
static member op_Explicit : int > Half
Public Shared Narrowing Operator CType (value As Integer) As Half
Parameters
 value
 Int32
The value to convert.
Returns
value
converted to its nearest representable halfprecision floatingpoint value.
Applies to
Explicit(Int64 to Half)
Explicitly converts a Int64 value to its nearest representable halfprecision floatingpoint value.
public:
static explicit operator Half(long value);
public static explicit operator Half (long value);
static member op_Explicit : int64 > Half
Public Shared Narrowing Operator CType (value As Long) As Half
Parameters
 value
 Int64
The value to convert.
Returns
value
converted to its nearest representable halfprecision floatingpoint value.
Applies to
Explicit(UInt64 to Half)
Important
This API is not CLScompliant.
Explicitly converts a UInt64 value to its nearest representable halfprecision floatingpoint value.
public:
static explicit operator Half(System::UInt64 value);
[System.CLSCompliant(false)]
public static explicit operator Half (ulong value);
[<System.CLSCompliant(false)>]
static member op_Explicit : uint64 > Half
Public Shared Narrowing Operator CType (value As ULong) As Half
Parameters
 value
 UInt64
The value to convert.
Returns
value
converted to its nearest representable halfprecision floatingpoint value.
 Attributes
Applies to
Explicit(Single to Half)
public:
static explicit operator Half(float value);
public static explicit operator Half (float value);
static member op_Explicit : single > Half
Public Shared Narrowing Operator CType (value As Single) As Half
Parameters
Returns
The Half representation of the specified singleprecision floating point value
.
Applies to
Explicit(UInt16 to Half)
Important
This API is not CLScompliant.
Explicitly converts a UInt16 value to its nearest representable halfprecision floatingpoint value.
public:
static explicit operator Half(System::UInt16 value);
[System.CLSCompliant(false)]
public static explicit operator Half (ushort value);
[<System.CLSCompliant(false)>]
static member op_Explicit : uint16 > Half
Public Shared Narrowing Operator CType (value As UShort) As Half
Parameters
 value
 UInt16
The value to convert.
Returns
value
converted to its nearest representable halfprecision floatingpoint value.
 Attributes
Applies to
Explicit(UInt32 to Half)
Important
This API is not CLScompliant.
Explicitly converts a UInt32 value to its nearest representable halfprecision floatingpoint value.
public:
static explicit operator Half(System::UInt32 value);
[System.CLSCompliant(false)]
public static explicit operator Half (uint value);
[<System.CLSCompliant(false)>]
static member op_Explicit : uint32 > Half
Public Shared Narrowing Operator CType (value As UInteger) As Half
Parameters
 value
 UInt32
The value to convert.
Returns
value
converted to its nearest representable halfprecision floatingpoint value.
 Attributes
Applies to
Explicit(Half to UInt16)
Important
This API is not CLScompliant.
Explicitly converts a halfprecision floatingpoint value to its nearest representable UInt16 value.
public:
static explicit operator System::UInt16(Half value);
[System.CLSCompliant(false)]
public static explicit operator ushort (Half value);
[<System.CLSCompliant(false)>]
static member op_Explicit : Half > uint16
Public Shared Narrowing Operator CType (value As Half) As UShort
Parameters
 value
 Half
The value to convert.
Returns
value
converted to its nearest representable UInt16 value.
 Attributes
Applies to
Explicit(UIntPtr to Half)
Important
This API is not CLScompliant.
Explicitly converts a UIntPtr value to its nearest representable halfprecision floatingpoint value.
public:
static explicit operator Half(UIntPtr value);
[System.CLSCompliant(false)]
public static explicit operator Half (UIntPtr value);
[<System.CLSCompliant(false)>]
static member op_Explicit : unativeint > Half
Public Shared Narrowing Operator CType (value As UIntPtr) As Half
Parameters
 value

UIntPtr
unativeint
The value to convert.
Returns
value
converted to its nearest representable halfprecision floatingpoint value.
 Attributes
Applies to
Explicit(IntPtr to Half)
Explicitly converts a IntPtr value to its nearest representable halfprecision floatingpoint value.
public:
static explicit operator Half(IntPtr value);
public static explicit operator Half (IntPtr value);
static member op_Explicit : nativeint > Half
Public Shared Narrowing Operator CType (value As IntPtr) As Half
Parameters
 value

IntPtr
nativeint
The value to convert.
Returns
value
converted to its nearest representable halfprecision floatingpoint value.
Applies to
Explicit(Half to UInt128)
Important
This API is not CLScompliant.
Explicitly converts a halfprecision floatingpoint value to its nearest representable UInt128.
public:
static explicit operator UInt128(Half value);
[System.CLSCompliant(false)]
public static explicit operator UInt128 (Half value);
[<System.CLSCompliant(false)>]
static member op_Explicit : Half > UInt128
Public Shared Narrowing Operator CType (value As Half) As UInt128
Parameters
 value
 Half
The value to convert.
Returns
value
converted to a 128bit unsigned integer.
 Attributes
Applies to
Explicit(Double to Half)
public:
static explicit operator Half(double value);
public static explicit operator Half (double value);
static member op_Explicit : double > Half
Public Shared Narrowing Operator CType (value As Double) As Half
Parameters
Returns
The Half representation of the specified doubleprecision floating point value
.
Applies to
Explicit(Half to SByte)
Important
This API is not CLScompliant.
Explicitly converts a halfprecision floatingpoint value to its nearest representable SByte value.
public:
static explicit operator System::SByte(Half value);
[System.CLSCompliant(false)]
public static explicit operator sbyte (Half value);
[<System.CLSCompliant(false)>]
static member op_Explicit : Half > sbyte
Public Shared Narrowing Operator CType (value As Half) As SByte
Parameters
 value
 Half
The value to convert.
Returns
value
converted to its nearest representable SByte value.
 Attributes
Applies to
Explicit(Char to Half)
Explicitly converts a Char value to its nearest representable halfprecision floatingpoint value.
public:
static explicit operator Half(char value);
public static explicit operator Half (char value);
static member op_Explicit : char > Half
Public Shared Narrowing Operator CType (value As Char) As Half
Parameters
 value
 Char
The value to convert.
Returns
value
converted to its nearest representable halfprecision floatingpoint value.
Applies to
Explicit(Decimal to Half)
Explicitly converts a Decimal value to its nearest representable halfprecision floatingpoint value.
public:
static explicit operator Half(System::Decimal value);
public static explicit operator Half (decimal value);
static member op_Explicit : decimal > Half
Public Shared Narrowing Operator CType (value As Decimal) As Half
Parameters
 value
 Decimal
The value to convert.
Returns
value
converted to its nearest representable halfprecision floatingpoint value.
Applies to
Explicit(Half to Single)
public:
static explicit operator float(Half value);
public static explicit operator float (Half value);
static member op_Explicit : Half > single
Public Shared Narrowing Operator CType (value As Half) As Single
Parameters
Returns
The Single representation of the specified halfprecision floating point value
.
Applies to
Explicit(Half to Byte)
Explicitly converts a halfprecision floatingpoint value to its nearest representable Byte value.
public:
static explicit operator System::Byte(Half value);
public static explicit operator byte (Half value);
static member op_Explicit : Half > byte
Public Shared Narrowing Operator CType (value As Half) As Byte
Parameters
 value
 Half
The value to convert.
Returns
value
converted to its nearest representable Byte value.
Applies to
Explicit(Half to Decimal)
Explicitly converts a halfprecision floatingpoint value to its nearest representable Decimal value.
public:
static explicit operator System::Decimal(Half value);
public static explicit operator decimal (Half value);
static member op_Explicit : Half > decimal
Public Shared Narrowing Operator CType (value As Half) As Decimal
Parameters
 value
 Half
The value to convert.
Returns
value
converted to its nearest representable Decimal value.
Applies to
Explicit(Half to Char)
Explicitly converts a halfprecision floatingpoint value to its nearest representable Char value.
public:
static explicit operator char(Half value);
public static explicit operator char (Half value);
static member op_Explicit : Half > char
Public Shared Narrowing Operator CType (value As Half) As Char
Parameters
 value
 Half
The value to convert.
Returns
value
converted to its nearest representable Char value.
Applies to
Explicit(Half to Int128)
Explicitly converts a halfprecision floatingpoint value to its nearest representable Int128.
public:
static explicit operator Int128(Half value);
public static explicit operator Int128 (Half value);
static member op_Explicit : Half > Int128
Public Shared Narrowing Operator CType (value As Half) As Int128
Parameters
 value
 Half
The value to convert.
Returns
value
converted to a 128bit signed integer.
Applies to
Explicit(Half to Int16)
Explicitly converts a halfprecision floatingpoint value to its nearest representable Int16 value.
public:
static explicit operator short(Half value);
public static explicit operator short (Half value);
static member op_Explicit : Half > int16
Public Shared Narrowing Operator CType (value As Half) As Short
Parameters
 value
 Half
The value to convert.
Returns
value
converted to its nearest representable Int16 value.
Applies to
Explicit(Half to Int32)
Explicitly converts a halfprecision floatingpoint value to its nearest representable Int32 value.
public:
static explicit operator int(Half value);
public static explicit operator int (Half value);
static member op_Explicit : Half > int
Public Shared Narrowing Operator CType (value As Half) As Integer
Parameters
 value
 Half
The value to convert.
Returns
value
converted to its nearest representable Int32 value.
Applies to
Explicit(Half to Int64)
Explicitly converts a halfprecision floatingpoint value to its nearest representable Int64 value.
public:
static explicit operator long(Half value);
public static explicit operator long (Half value);
static member op_Explicit : Half > int64
Public Shared Narrowing Operator CType (value As Half) As Long
Parameters
 value
 Half
The value to convert.
Returns
value
converted to its nearest representable Int64 value.
Applies to
Explicit(Half to IntPtr)
Explicitly converts a halfprecision floatingpoint value to its nearest representable IntPtr value.
public:
static explicit operator IntPtr(Half value);
public static explicit operator IntPtr (Half value);
static member op_Explicit : Half > nativeint
Public Shared Narrowing Operator CType (value As Half) As IntPtr
Parameters
 value
 Half
The value to convert.
Returns

IntPtr
nativeint
value
converted to its nearest representable IntPtr value.
Applies to
Explicit(Half to Double)
public:
static explicit operator double(Half value);
public static explicit operator double (Half value);
static member op_Explicit : Half > double
Public Shared Narrowing Operator CType (value As Half) As Double
Parameters
Returns
The Double representation of the specified halfprecision floating point value
.