Updated: April 2009
Returns the string representation of the value of this instance.
Assembly: mscorlib (in mscorlib.dll)
Return ValueType: System::String
A string that represents the value of this instance. The return value is of the form:
Elements in square brackets ([ and ]) may not be included in the returned string. Colons and periods (: and.) are literal characters. The non-literal elements are listed in the following table.
A minus sign, which indicates a negative time span. No sign is included for a positive time span.
The number of days in the time span. This element is omitted if the time span is less than one day.
The number of hours in the time span, ranging from 0 to 23.
The number of minutes in the time span, ranging from 0 to 59.
The number of seconds in the time span, ranging from 0 to 59.
Fractional seconds in the time span. This element is omitted if the time span does not include fractional seconds. If present, fractional seconds are always expressed using 7 decimal digits.
For more information about comparing the string representation of TimeSpan and Oracle data types, see article Q324577, "System.TimeSpan Does Not Match Oracle 9i INTERVAL DAY TO SECOND Data Type," in the Microsoft Knowledge Base at http://support.microsoft.com.
The return value of this method can be consumed by Parse.
Note that the method does not include an overload that includes format specifiers and provides precise control over the returned string. To define the precise format of the returned string, you can format a TimeSpan object's individual property values, as the following example shows. For more information, see Numeric Format Strings.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.