Search code examples
.netconstantsseconds

.NET constant for number of seconds in a day?


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


Solution

  • If you want readability you could use:

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

    though just using your own const might be clearer :)