Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将像 2013-04-09T08:08:59.320Z 这样的日期反序列化为来自 Json 的默认/自定义格式,默认情况下我从服务器获取这种格式。现在我想在不使用第三方工具或 dll 的情况下以自定义或默认格式反序列化。我们该怎么做?请帮忙。
以下是上述问题的解决方案。
DateTime dates = 2013-04-09T08:08:59.302Z ; DateTime d2 = DateTime.Parse(abc.modifiedDate, null, DateTimeStyles.RoundtripKind); Console.WriteLine(d2.ToString());