ToLocalCurrencyString

/// <summary>
/// Extensions for numeric types.
/// </summary>
public static class NumericExtensions
{
    /// <summary>
    /// Format a double using the local culture currency settings.
    /// </summary>
    /// <param name="value">The double to be formatted.</param>
    /// <returns>The double formatted based on the local culture currency settings.</returns>
    public static string ToLocalCurrencyString(this double value)
    {
        return (String.Format("{0:C}", value));
    }
}
Example:
double test = 145.90;
string testString = test.ToLocalCurrencyString();

Description

Convert a double to a string formatted using the local currency settings.

Details

Double click on the code to select all.

 

;