Double - FromMinutes

Returns a TimeSpan that represents a specified number of minutes, where the specification is accurate to the nearest millisecond.

Try it

public static void Main()
{
    double[] values = { 1, 60, 3600, 7885522.00458, 12345.678987654, 4854440};

    Console.WriteLine("{0,21}{1,18}","FromMinutes", "TimeSpan");
    Console.WriteLine("{0,21}{1,18}","--------", "--------");

    foreach (double value in values)
    {
		// C# Extension Method: Double - FromMinutes
        TimeSpan interval = value.FromMinutes();
        string timeInterval = interval.ToString();

        int pIndex = timeInterval.IndexOf(':');
        pIndex = timeInterval.IndexOf('.', pIndex);
        if (pIndex < 0) timeInterval += "        ";

        Console.WriteLine("{0,21}{1,26}", value, timeInterval);
    }
}

View Source
using System;

public static partial class Extensions
{
    /// <summary>
    ///     Returns a  that represents a specified number of minutes, where the specification is accurate to the nearest
    ///     millisecond.
    /// </summary>
    /// <param name="value">A number of minutes, accurate to the nearest millisecond.</param>
    /// <returns>An object that represents .</returns>
    public static TimeSpan FromMinutes(this Double value)
    {
        return TimeSpan.FromMinutes(value);
    }
}