.NET常数秒的日数?日数、常数、NET

2023-09-06 09:03:56 作者:吧唧你一大口

是否.NET具有恒定的的秒数在一天(86400)?

Does .NET have a constant for the number of seconds in a day (86400)?

推荐答案

如果你想可读性,你可以使用:

If you want readability you could use:

(new TimeSpan(1,0,0,0)).TotalSeconds

虽然只是用自己的常量可能会更清楚:)

though just using your own const might be clearer :)