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

定義

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

public:
 static void WriteInt16BigEndian(Span<System::Byte> destination, short value);
public static void WriteInt16BigEndian(Span<byte> destination, short value);
static member WriteInt16BigEndian : Span<byte> * int16 -> unit
Public Shared Sub WriteInt16BigEndian (destination As Span(Of Byte), value As Short)

參數

destination
Span<Byte>

值要寫入的位元組範圍,也就是大端序。

value
Int16

要寫入位元組區間的值。

例外狀況

destination太小,無法包含一個。Int16

備註

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

適用於