語言

JsonElement.GetUInt16 方法

定義

重要

此 API 不符合 CLS 規範。

會取得目前的 JSON 編號為 UInt16。

public:
 System::UInt16 GetUInt16();
[System.CLSCompliant(false)]
public ushort GetUInt16();
[<System.CLSCompliant(false)>]
member this.GetUInt16 : unit -> uint16
Public Function GetUInt16 () As UShort

傳回

目前的 JSON 編號為 UInt16.

屬性

例外狀況

這個值的 ValueKind 值不是 Number。

該值無法表示為 UInt16。

父母 JsonDocument 已被處理掉。

備註

此方法不會解析 JSON 字串值的內容。

適用於