TimeSpan to string
In this chapter you will learn:
Output TimeSpan to string
using System;//from j a v a 2 s . co m
class MainClass
{
static void CreateTimeSpan( long ticks )
{
TimeSpan interval = new TimeSpan(2, 14, 18);
Console.WriteLine(interval.ToString());
}
static void Main( )
{
CreateTimeSpan( 999999 );
}
}
The code above generates the following result.
Next chapter...
What you will learn in the next chapter:
Home » C# Tutorial » Date, Time, TimeZone