.NET常数秒的日数? [英] .NET constant for number of seconds in a day?

查看:103
本文介绍了.NET常数秒的日数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否.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 :)

这篇关于.NET常数秒的日数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆