Looking for a good Money data type for .NET that supports currencies and exchange rates (with related behaviour & operatio
If you are looking for patterns, you could check out Joda Money. It is Java, but should give you some ideas on an API. A C# implementation would be much less verbose due to operator overloading.
I do understand your points about the benefit of having abstraction layer over money here. However, my view on money and its "operations" is quite blurry. For other things like File
, it's clear to me there should be Open
, Read
, Write
, Close
operations. But for Money, I can't think of much other than basic math operations (+,-,*,/)
One of C++ quantitative finance lib I know does contain this Money abstraction (http://quantlib.org/reference/class_quant_lib_1_1_money.html.) But you can clearly see that this is a very thin wrapper which provide basic operator overloads and unit conversion over Decimal.
In most cases, I think decimal can fulfill your requirement. If there is specific Money operation you need to support, I think it's okay to roll out your own classes.