Mono Class Library: System.Xml.XmlConvert Overview | Members

System.Xml.XmlConvert.ToString Method

Converts a TimeSpan to a string. [Edit]

public static string ToString (TimeSpan value)

Parameters

value
The TimeSpan to convert. [Edit]

Returns

The string representation of value. [Edit]

Remarks

Documentation for this section has not yet been entered. [Edit]

Example

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

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0