Working with Time
You often need to represent intervals of time in your applications, especially in conjunction with dates. The .NET Framework provides a structure for this: a value type named System.TimeSpan. This structure can represent time from a minimum value (one tick) until a maximum value (one day). A tick is the smallest unit for time representations and is equal to 100 nanoseconds. TimeSpan represents a summed amount of time between two given time values, and the time portion of a Date object represents a single specific moment in time.
Minimum and Maximum Values
As for other value types, System.TimeSpan also provides two shared properties named MinValue and MaxValue. MinValue returns -10675199.02:48:05.4775808, and MaxValue returns ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access