A string representation of the TimeSpan.
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