JsonElement.GetDateTime 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得元素的值為 DateTime。
public:
DateTime GetDateTime();
public DateTime GetDateTime();
member this.GetDateTime : unit -> DateTime
Public Function GetDateTime () As DateTime
傳回
元素作為 DateTime的值。
例外狀況
該值不能被解讀為 DateTime。
父母 JsonDocument 已被處理掉。
備註
此方法僅建立符合 ISO 8601-1 擴展格式的 JSON 字串 DateTime 表示(參見 System.Text.JSON 中的 DateTime 與 DateTimeOffset 支援)。