BinaryPrimitives.WriteUInt16LittleEndian(Span<Byte>, UInt16) 方法

定義

重要

此 API 不符合 CLS 規範。

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

public:
 static void WriteUInt16LittleEndian(Span<System::Byte> destination, System::UInt16 value);
[System.CLSCompliant(false)]
public static void WriteUInt16LittleEndian(Span<byte> destination, ushort value);
[<System.CLSCompliant(false)>]
static member WriteUInt16LittleEndian : Span<byte> * uint16 -> unit
Public Shared Sub WriteUInt16LittleEndian (destination As Span(Of Byte), value As UShort)

參數

destination
Span<Byte>

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

value
UInt16

要寫入位元組區間的值。

屬性

例外狀況

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

備註

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

適用於