C# TimeSpan TotalMinutes
Description
TimeSpan TotalMinutes
gets the value of the current TimeSpan
structure expressed in whole and fractional minutes.
Syntax
TimeSpan.TotalMinutes
has the following syntax.
public double TotalMinutes { get; }
Example
The following example instantiates a TimeSpan object and displays the value of its TotalMinutes property.
/* ww w . j a v a 2s .c o m*/
using System;
public class Example
{
public static void Main()
{
// Define an interval of 1 day, 15+ hours.
TimeSpan interval = new TimeSpan(1, 15, 42, 45, 750);
Console.WriteLine("Value of TimeSpan: {0}", interval);
Console.WriteLine("{0:N5} minutes, as follows:", interval.TotalMinutes);
}
}
The code above generates the following result.