-
Notifications
You must be signed in to change notification settings - Fork 5k
[API Proposal]: CurrencyInfo #115322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Tagging subscribers to this area: @dotnet/area-system-globalization |
Thanks for your suggestion. I don't see how this simplifies anything. You're essentially suggesting replacing |
It's an accessor, nowadays if someone needs to get the currency info he/she needs to go through |
What's wrong with that? Currency is always associated with a region, so it makes sense to retrieve it through the region. It's similar to how date formats work—they're tied to a culture, so you obtain them through the culture. and not having something like |
Also we already have |
You only get the |
Again I find |
I’d agree with you if |
I'm not saying to remove the previous properties, we could keep them for compatibility, we could introduce a property on CurrencyInfo currencyInfo = CultureInfo.GetCultureInfo("en-US").Currency;
Console.WriteLine(currencyInfo.Code); This will be similar to what we have today, so we can deprecate the previous properties if they don't fit in the proper place. We could got a feedback from the team and community |
Background and motivation
Simplify the process for accessing currency information. The intent is to introduce a new class
CurrencyInfo
, something similar toCultureInfo
andRegionInfo
, that encapsulates the currency metadata that's currently available inRegionInfo
If you find this a good idea, I can submit a PR
API Proposal
API Usage
The text was updated successfully, but these errors were encountered: