OK, I'm successfully changing cultures on the fly, working fine. I needed this for date formatting, but that's ALL I need it for. Unfortunately its also changing currency, which I do NOT want it to do. I need currency to display in USD at all times.
Here's what I've got, can anyone shed some light on how I keep the currency formatting in USD?
DarthSwian
Star
12879 Points
2380 Posts
Dynamically set culture for date format but keep currency USD
Jun 27, 2012 02:55 PM|LINK
OK, I'm successfully changing cultures on the fly, working fine. I needed this for date formatting, but that's ALL I need it for. Unfortunately its also changing currency, which I do NOT want it to do. I need currency to display in USD at all times.
Here's what I've got, can anyone shed some light on how I keep the currency formatting in USD?
<div style="color: black; overflow: auto; width: 99.5%;">{{}}</div>Seek and ye shall find or http://lmgtfy.com/
DarthSwian
Star
12879 Points
2380 Posts
Re: Dynamically set culture for date format but keep currency USD
Jun 27, 2012 03:25 PM|LINK
OK, I've found a way to set this at the string level:
.ToString("C2", CultureInfo.CreateSpecificCulture("en-US"))
I'll proceed using this unless I find a way to do it where I'm setting the culture
Seek and ye shall find or http://lmgtfy.com/