Create TimeSpan from a specified number of minutes in CSharp
Description
The following code shows how to create TimeSpan from a specified number of minutes.
Example
using System;/*from ww w. j av a 2s . c o m*/
class MainClass
{
static void Main( )
{
TimeSpan interval = TimeSpan.FromMinutes( 6 );
string timeInterval = interval.ToString( );
Console.WriteLine( timeInterval );
}
}
The code above generates the following result.