JsonElement.GetDateTime 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取元素的值作为一个 DateTime。
public:
DateTime GetDateTime();
public DateTime GetDateTime();
member this.GetDateTime : unit -> DateTime
Public Function GetDateTime () As DateTime
返回
作为 . DateTime的元素的值。
例外
不能将值读取为 .DateTime
注解
此方法仅创建符合 ISO 8601-1 扩展格式的 JSON 字符串的 DateTime 表示形式(请参阅 System.Text.Json 中的 DateTime 和 DateTimeOffset 支持)。