Money data type for .NET?

后端 未结 8 1197
Happy的楠姐
Happy的楠姐 2021-01-31 02:52

Looking for a good Money data type for .NET that supports currencies and exchange rates (with related behaviour & operatio

8条回答
  •  逝去的感伤
    2021-01-31 03:43

    Have a look here:

    http://blogs.msdn.com/lucabol/archive/2008/12/04/financial-functions-for-net-released.aspx

    It provides a .NET library replicating all the excel financial functions.

    Doing currency conversion is tricky, because obviously it changes continously, so hardcoded values will be more or less useless. However, you may be able to use a web service to access up-to-date exchange rates. This one looks like a good start. Even better, a REST-style interface to the same converter:

    http://www.webservicex.com/CurrencyConvertor.asmx/ConversionRate?FromCurrency=GBP&ToCurrency=EUR
    

    So that outputs the conversion rate of pounds sterling to euros.

提交回复
热议问题