Double - Sqrt

Returns the square root of a specified number.

Try it

public static void Main()
{
    double[] values = { 25653.25, 7883.75, 256, 64.0, 35.36, 8, 0, -7.6 };
    Console.WriteLine("  Value            Sqrt\n");

    foreach (double value in values)
    {
		// C# Extension Method: Double - Sqrt
        Console.WriteLine("{0,7} {1,16:N3}", value, value.Sqrt());
    }
}

View Source
using System;

public static partial class Extensions
{
    /// <summary>
    ///     Returns the square root of a specified number.
    /// </summary>
    /// <param name="d">The number whose square root is to be found.</param>
    /// <returns>
    ///     One of the values in the following table.  parameter Return value Zero or positive The positive square root
    ///     of . Negative Equals Equals.
    /// </returns>
    public static Double Sqrt(this Double d)
    {
        return Math.Sqrt(d);
    }
}