C# TimeSpan FromMinutes
Description
TimeSpan FromMinutes
returns a TimeSpan that represents
a specified number of minutes, where the specification is accurate to the
nearest millisecond.
Syntax
TimeSpan.FromMinutes
has the following syntax.
public static TimeSpan FromMinutes(
double value
)
Parameters
TimeSpan.FromMinutes
has the following parameters.
value
- A number of minutes, accurate to the nearest millisecond.
Returns
TimeSpan.FromMinutes
method returns An object that represents value.
Example
The following example creates several TimeSpan objects using the FromMinutes method.
using System;/*from w ww .jav a 2 s . 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.