語言

CborReader.ReadDefiniteLengthTextStringBytes 方法

定義

將下一個資料項目讀取為確定長度的 UTF-8 文字字串(主要類型 3)。

public:
 ReadOnlyMemory<System::Byte> ReadDefiniteLengthTextStringBytes();
public ReadOnlyMemory<byte> ReadDefiniteLengthTextStringBytes();
member this.ReadDefiniteLengthTextStringBytes : unit -> ReadOnlyMemory<byte>
Public Function ReadDefiniteLengthTextStringBytes () As ReadOnlyMemory(Of Byte)

傳回

ReadOnlyMemory<T>原始 UTF-8 有效載荷的視圖。

例外狀況

下一個資料項目沒有正確的主要類型。

-或-

資料項目是一個不定長度的文字字串。

下一個值的 CBOR 編碼無效。

-或-

CBOR 編碼資料意外終止。

-或-

下一個值使用了在當前相容模式下無效的 CBOR 編碼。

適用於