prince raj

prince raj

  • NA
  • 88
  • 44.6k

How to use two parameter in Standard Numeric Format Strings

Jul 10 2014 10:04 AM
Hi,
 
i have double variable (that contain amount in rupees)
Double d = 50000.65487;
 
Now i need this in below string format
50,000 (i mean with Group separators and removing removing . (.65487)).

CultureInfo ci = new CultureInfo("en-us");
 
lbl_interest.Text = d.ToString("F0", ci);
output -> 50000 (removed floating point)
lbl_interest.Text = d.ToString("N", ci);
output -> 50,000.65487 (With Grouping)
 
Now i want to make combination of both, so how can i ?


Answers (1)