JsonElement.TryGetInt16(Int16) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
嘗試將目前的 JSON 數字表示為 Int16.
public:
bool TryGetInt16([Runtime::InteropServices::Out] short % value);
public bool TryGetInt16(out short value);
member this.TryGetInt16 : int16 -> bool
Public Function TryGetInt16 (ByRef value As Short) As Boolean
參數
- value
- Int16
當此方法回傳時,包含與當前 JSON 數字相當的 16 位元整數值(若轉換成功),若轉換失敗則為 0。
傳回
true若該數字可表示Int16為;否則,。 false
例外狀況
父母 JsonDocument 已被處理掉。
備註
此方法不會解析 JSON 字串值的內容。