JsonElement.TryGetByte(Byte) 方法

定義

嘗試以 Byte 表示目前的 JSON 數字。

public:
 bool TryGetByte([Runtime::InteropServices::Out] System::Byte % value);
public bool TryGetByte (out byte value);
member this.TryGetByte : byte -> bool
Public Function TryGetByte (ByRef value As Byte) As Boolean

參數

value
Byte

當這個方法傳回時,如果轉換成功,則包含相當於目前 JSON 數位的位元組,如果轉換失敗則為 0。

傳回

若數字可以表示為 Byte,則為 true;否則為 false

例外狀況

JsonDocument 已經過處置。

備註

這個方法不會剖析 JSON 字串值的內容。

適用於