BinaryPrimitives.ReadUInt16BigEndian(ReadOnlySpan<Byte>) 方法

定義

重要

此 API 不符合 CLS 規範。

從一個只讀的位元組區段開始讀取 a UInt16 ,作為大端序。

public:
 static System::UInt16 ReadUInt16BigEndian(ReadOnlySpan<System::Byte> source);
[System.CLSCompliant(false)]
public static ushort ReadUInt16BigEndian(ReadOnlySpan<byte> source);
[<System.CLSCompliant(false)>]
static member ReadUInt16BigEndian : ReadOnlySpan<byte> -> uint16
Public Shared Function ReadUInt16BigEndian (source As ReadOnlySpan(Of Byte)) As UShort

參數

source
ReadOnlySpan<Byte>

唯讀範圍用來讀取。

傳回

大端值。

屬性

例外狀況

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

備註

從區間起始處讀取恰好 2 位元組。

適用於