TimeSpanToString Method (String) |
Converts the value of the current
TimeSpan object to its equivalent string representation by using the specified format.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public string ToString(
string format
)
Parameters
- format
- Type: SystemString
A standard or custom TimeSpan format string.
Return Value
Type:
StringThe string representation of the current
TimeSpan value in the format specified by the
format parameter.
Exceptions Exception | Condition |
---|
FormatException | The format parameter is not recognized or is not supported. |
See Also