JsonElement.TryGetGuid(Guid) 方法

定義

嘗試以 Guid 表示目前的 JSON 字串。

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

參數

value
Guid

當這個方法傳回時,如果轉換成功,則包含相當於目前 JSON 字串的 GUID,如果 Empty 轉換失敗,則為 。

傳回

若字串可以表示為 Guid,則為 true;否則為 false

例外狀況

JsonDocument 已經過處置。

備註

這個方法不會建立 JSON 字串以外的值的 Guid 標記法。

適用於