System.TimeSpan.TotalMinutes Property

Gets the value of the current TimeSpan structure expressed in whole and fractional minutes.

Syntax

public double TotalMinutes { get; }

Value

A double that specifies the total number of minutes represented by the current instance.

Remarks

This property converts the value of this instance from ticks to minutes. This number might include whole and fractional minutes.

The TimeSpan.TotalMinutes property represents whole and fractional minutes, whereas the TimeSpan.Minutes property represents whole minutes.

Example

This example demonstrates using the TimeSpan.TotalMinutes property.

C# Example

using System;
public class TimeSpanTotalUnitsProperties{
   public static void Main() {
      TimeSpan ts = new TimeSpan((Int64)10e12);
      Console.WriteLine(ts.ToString());
      Console.WriteLine("TotalMinutes: {0}", ts.TotalMinutes);
   }
}

The output is

11.13:46:40
TotalMinutes: 16666.6666666667

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0