ExtensionMethod.NET Home of 876 C#, Visual Basic, F# and Javascript extension methods


Converts a decimal to a string using the current UI culture


using System.Globalization;

namespace Extensions
    public static class DecimalExtensions
         public static string ToUIString(this decimal value)
             return value.ToString(CultureInfo.CurrentUICulture);


var amount = 10.25m;
Amount.Text = amount.ToUIString();

Author: Guy Van den Nieuwenhof

Submitted on: 24 jul 2012

Language: C#

Type: System.Decimal

Views: 5739