The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
TimeSpan::MaxValue Field
.NET Framework (current version)
Represents the maximum TimeSpan value. This field is read-only.
Assembly: mscorlib (in mscorlib.dll)
The value of this field is equivalent to Int64::MaxValue ticks. The string representation of this value is positive 10675199.02:48:05.4775807, or slightly more than 10,675,199 days.
The following example references and displays the value of the MaxValue field.
// Example of the TimeSpan fields. using namespace System; // Pad the end of a TimeSpan string with spaces if it does not // contain milliseconds. String^ Align( TimeSpan interval ) { String^ intervalStr = interval.ToString(); int pointIndex = intervalStr->IndexOf( ':' ); pointIndex = intervalStr->IndexOf( '.', pointIndex ); if ( pointIndex < 0 ) intervalStr = String::Concat( intervalStr, " " ); return intervalStr; } int main() { String^ numberFmt = "{0,-22}{1,18:N0}"; String^ timeFmt = "{0,-22}{1,26}"; Console::WriteLine( "This example of the fields of the TimeSpan class" "\ngenerates the following output.\n" ); Console::WriteLine( numberFmt, "Field", "Value" ); Console::WriteLine( numberFmt, "-----", "-----" ); // Display the maximum, minimum, and zero TimeSpan values. Console::WriteLine( timeFmt, "Maximum TimeSpan", Align( TimeSpan::MaxValue ) ); Console::WriteLine( timeFmt, "Minimum TimeSpan", Align( TimeSpan::MinValue ) ); Console::WriteLine( timeFmt, "Zero TimeSpan", Align( TimeSpan::Zero ) ); Console::WriteLine(); // Display the ticks-per-time-unit fields. Console::WriteLine( numberFmt, "Ticks per day", TimeSpan::TicksPerDay ); Console::WriteLine( numberFmt, "Ticks per hour", TimeSpan::TicksPerHour ); Console::WriteLine( numberFmt, "Ticks per minute", TimeSpan::TicksPerMinute ); Console::WriteLine( numberFmt, "Ticks per second", TimeSpan::TicksPerSecond ); Console::WriteLine( numberFmt, "Ticks per millisecond", TimeSpan::TicksPerMillisecond ); } /* This example of the fields of the TimeSpan class generates the following output. Field Value ----- ----- Maximum TimeSpan 10675199.02:48:05.4775807 Minimum TimeSpan -10675199.02:48:05.4775808 Zero TimeSpan 00:00:00 Ticks per day 864,000,000,000 Ticks per hour 36,000,000,000 Ticks per minute 600,000,000 Ticks per second 10,000,000 Ticks per millisecond 10,000 */
Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Show: