TimeSpanStatic

TimeSpanStatic


Provides severs static functions to help in creating TimeSpan objects.


Public:

Properties:

NameDescription
 MaxValue (get) Gets a TimeSpan with a maximum value.  
 MinValue (get) Gets a TimeSpan with a minimum value.  
 Zero (get) Gets a TimeSpan with a value of zero. 

Methods:

NameDescription
 Add Returns a new TimeSpan object whose value is the sum of two TimeSpan objects.  
 Compare Compares two TimeSpan values and returns an integer that indicates whether the first value is shorter than, equal to, or longer than the second value.  
 Equals Returns a boolean indicating if the Left TimeSpan instance is equal to the Right instance.  
 FromDate Returns a TimeSpan object representing the time of day of the date.  
 FromDays Returns a TimeSpan that represents a specified time, where the specification is in units of days.  
 FromHours Returns a TimeSpan that represents a specified time, where the specification is in units of hours.  
 FromMilliseconds Returns a TimeSpan that represents a specified time, where the specification is in units of milliseconds.  
 FromMinutes Returns a TimeSpan that represents a specified time, where the specification is in units of minutes.  
 FromSeconds Returns a TimeSpan that represents a specified time, where the specification is in units of seconds.  
 FromTicks Returns a TimeSpan that represents a specified time, where the specification is in units of ticks.  
 GreaterThan Returns a boolean indicating if the Left TimeSpan instance is greater-than the Right instance.  
 LessThan Returns a boolean indicating if the Left TimeSpan instance is less-than the Right instance.  
 Parse Parses a string in the format of [d.]h:mm:ss[.ff] into a TimeSpan.  
 Subtract Returns a new TimeSpan object whose value is the difference between the two TimeSpan objects.  
 ToString Converts the value of the current TimeSpan object to its equivalent string representation by using the specified format and culture-specific formatting information.  
 TryParse Attempts to parse the string into a TimeSpan object.  

See Also

Project CorLib Overview

Class TimeSpanStatic Overview

TimeSpan