Friday, May 27, 2011

Double to Current format with the currency Symbol

CultureInfo cultureInfo = new CultureInfo("en-US");
cultureInfo
.NumberFormat.CurrencySymbol = "Rs.";
Thread.CurrentThread.CurrentCulture = cultureInfo;
decimal devimalValue = 3.45M;
this.Text = devimalValue.ToString("C2");

No comments :

Post a Comment