BinaryPrimitives.TryWriteHalfBigEndian(Span<Byte>, Half) Method

Definition

Writes a Half into a span of bytes, as big endian.

public:
 static bool TryWriteHalfBigEndian(Span<System::Byte> destination, Half value);
public static bool TryWriteHalfBigEndian (Span<byte> destination, Half value);
static member TryWriteHalfBigEndian : Span<byte> * Half -> bool
Public Shared Function TryWriteHalfBigEndian (destination As Span(Of Byte), value As Half) As Boolean

Parameters

destination
Span<Byte>

The span of bytes where the value is to be written, as big endian.

value
Half

The value to write into the span of bytes.

Returns

true if the span is large enough to contain a Half; otherwise, false.

Remarks

Writes exactly 2 bytes to the beginning of the span.

Applies to