.net - .Net 中是否有描述最小 Windows FileTime 值的常量?

标签 .net datetime constants

我正在使用 DateTime.ToFileTime 和 FromFileTime 方法在数据库中存储和检索时间戳。最小的 windows 文件时间是 1601 年 1 月 1 日午夜。是否有一个类似于 DateTime.MinValue 的常量来描述这个值?

最佳答案

不,但创建自己的很简单:

    public static readonly DateTime MinFileTime = DateTime.FromFileTimeUtc(0);

关于.net - .Net 中是否有描述最小 Windows FileTime 值的常量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2165431/

相关文章:

.net - VS 2010 IDE 2GB 限制

c# - 在 DLL 'glBindFramebuffer' 中找不到名为 'opengl32.dll' 的入口点。在 MonoGame 3.0 中

PHP & MySQL : While Loop

php - PHP 中是否有一个配置选项来防止未定义的常量被解释为字符串?

.net - DataTrigger 使 WPF 按钮处于非事件状态,直到 TextBox 具有值

c# - 确定 CultureInfo 是否使用特定语言的替代方法?

c# - 将日期时间转换为字符串并返回日期时间

c# 执行 1.09 :00:00 timespan mean 9am tomorrow?

c++ - 如果我定义带有非常量参数的复制构造函数和 operator= ,我仍然会得到默认的复制构造函数和 operator= 吗?

c++ - 常量引用不是 "updated"