BinaryPrimitives.TryWriteInt16LittleEndian(Span<Byte>, Int16) 方法

定義

將 an Int16 寫入一個位元組區間,作為小端序。

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

參數

destination
Span<Byte>

值要寫入的位元組範圍,以小端序(little endian)表示。

value
Int16

要寫入位元組區間的值。

傳回

true若跨度足夠大以容納;Int16否則,。 false

備註

在區間的開頭寫入恰好 2 位元組。

適用於