BinaryPrimitives.TryWriteUInt16LittleEndian(Span<Byte>, UInt16) Metod

Definition

Viktigt!

Detta API uppfyller inte CLS.

Skriver en UInt16 till ett intervall med byte, som liten endian.

public:
 static bool TryWriteUInt16LittleEndian(Span<System::Byte> destination, System::UInt16 value);
[System.CLSCompliant(false)]
public static bool TryWriteUInt16LittleEndian(Span<byte> destination, ushort value);
[<System.CLSCompliant(false)>]
static member TryWriteUInt16LittleEndian : Span<byte> * uint16 -> bool
Public Shared Function TryWriteUInt16LittleEndian (destination As Span(Of Byte), value As UShort) As Boolean

Parametrar

destination
Span<Byte>

Intervallet för byte där värdet ska skrivas, som lite endian.

value
UInt16

Värdet som ska skrivas in i byteintervallet.

Returer

true om intervallet är tillräckligt stort för att innehålla en UInt16, annars , false.

Attribut

Kommentarer

Skriver exakt 2 byte till början av intervallet.

Gäller för