When my application starts, it sets its own culture to CultureInfo.InvariantCulture but in some places, I want to use localized number formatting according to what the user has set in Windows. How can I do this?
System.Globalization.CultureInfo.CurrentCulture only returns the thread's culture which is no longer the user's default.
I'm hoping for a more elegant way than storing the thread's default culture before changing it or creating a new thread just to read the culture out of it.
Maybe there's a built-in .Net wrapper for the Windows function GetUserDefaultLocaleName?