語言

CborReader.ReadCborNegativeIntegerRepresentation 方法

定義

重要

此 API 不符合 CLS 規範。

將下一個資料項目讀取為 CBOR 負整數表示(主要類型 1)。

public:
 System::UInt64 ReadCborNegativeIntegerRepresentation();
[System.CLSCompliant(false)]
public ulong ReadCborNegativeIntegerRepresentation();
[<System.CLSCompliant(false)>]
member this.ReadCborNegativeIntegerRepresentation : unit -> uint64
Public Function ReadCborNegativeIntegerRepresentation () As ULong

傳回

一個無符號整數,表示 -1 減整數。

屬性

例外狀況

編碼整數在 的 UInt32範圍內不在。

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

下一個值的 CBOR 編碼無效。

-或-

CBOR 編碼資料意外終止。

-或-

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

備註

此方法支援解碼介於 -18446744073709551616 到 -1 之間的整數。 對於處理不符合類型 Int64 範圍的數值非常有用。

適用於