语言

JsonElement.TryGetByte(Byte) 方法

定义

尝试将当前 JSON 编号表示为一个 Byte。

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。

返回

true 如果数字可以表示为 , Byte则为 ;否则为 false。

例外

JsonDocument父级已被释放。

注解

此方法不分析 JSON 字符串值的内容。

适用于