Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Currency Library [closed]

I am looking for a .Net class/library to use with currency acronyms in the same way the TimeZoneInfo class works with timezones.

I need to populate a drop down list with these acronyms and store the result in a databse. This value will be used to retrieve up to date exchange rates from the web at a later stage.

Any ideas?

like image 790
menzies Avatar asked Apr 22 '09 06:04

menzies


People also ask

Why are libraries closing in the UK?

Public spending cuts have closed almost 800 libraries in the past decade – a fifth of the UK's total. It is a campaign of vandalism against our culture and communities led by the Tory government.

How many libraries closed since 2010?

Nearly 800 public libraries closed since austerity launched in 2010.

What is the last currency in the world?

US Dollar is the largest reserve currency in the world.

How many library authorities are there in the UK?

There are currently 151 separate library authorities in England who use a range of different operating models to provide their library services.


2 Answers

CultureInfo[] cultures = CultureInfo.GetCultures(CultureTypes.SpecificCultures);
IEnumerable<string> currencySymbols = cultures.Select<CultureInfo, string>(culture => new RegionInfo(culture.LCID).ISOCurrencySymbol);

Is it what you are looking for?

like image 158
Dmitry Ornatsky Avatar answered Sep 30 '22 14:09

Dmitry Ornatsky


You might be better off generating the list yourself and putting it in a database along with related information. I've used this approach fairly successfully

Country  Currency Name Symbol Code

USA  US Dollar  $ USD

There are a couple of benefits

  1. Reporting is much easier as you can join on this table and format the output as necessary
  2. Changes in the sector can be catered for
  3. Complicated scenarios such as countries supporting multiple currencies can be handled
like image 39
Rad Avatar answered Sep 30 '22 12:09

Rad