Converts a TimeSpan to a string.
- value
- The TimeSpan to convert.
The string representation of value.
Documentation for this section has not yet been entered.
The following example converts a TimeSpan to a string and writes the result to the console.
C# Example
using System; using System.Xml; public class App { public static void Main() { TimeSpan timeSpan = new TimeSpan(3, 11, 59, 6, 128); Console.WriteLine( "{0}", XmlConvert.ToString(timeSpan) ); } }The output is
P3DT11H59M6.128S
Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0