Converts TimeSpan to string with default ToString
using System;
public class ToString
{
public static void Main()
{
TimeSpan span;
span = TimeSpan.Zero;
Console.WriteLine(span);
span = new TimeSpan(-14, 0, 0, 0, 0);
Console.WriteLine(span);
span = new TimeSpan(1, 2, 3);
Console.WriteLine(span);
span = new TimeSpan(3, 0, 0);
Console.WriteLine(span);
span = new TimeSpan(0, 0, 0, 0, 25);
Console.WriteLine(span);
}
}
Related examples in the same category