BinaryPrimitives.TryWriteSingleLittleEndian(Span<Byte>, Single) Method

Definition

Writes a Single into a span of bytes, as little endian.

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

Parameters

destination
Span<Byte>

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

value
Single

The value to write into the span of bytes.

Returns

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

Remarks

Writes exactly 4 bytes to the beginning of the span.

Applies to