gpt4 book ai didi

c# - 获取静态 DateTime 值的最佳方法

转载 作者:行者123 更新时间:2023-11-30 19:08:10 27 4
gpt4 key购买 nike

在 C# 中获取静态 DateTime 值是否有比以下方法更好的方法?

public static DateTime StartOfRecordedHistory = DateTime.Parse("2004-01-01");

谢谢!

最佳答案

public static DateTime StartOfRecordedHistory = new DateTime(2004, 1, 1)

关于c# - 获取静态 DateTime 值的最佳方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1491258/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com