RemyDuijkeren / NodaMoney

NodaMoney provides a library that treats Money as a first class citizen and handles all the ugly bits like currencies and formatting.
Apache License 2.0
211 stars 45 forks source link

Extension factory methods for numeric types #9

Open RemyDuijkeren opened 9 years ago

RemyDuijkeren commented 9 years ago

We could add extension factory methods for the decimal type, like 123.45.Euro(), etc.

Not sure if this is desired, because it is on a primitive data type in .NET.

rubenrorije commented 5 years ago

I suspect there are developers with very strong opinions either way. I think it would be the best option to move these extension methods to a different namespace, e.g. NodaMoney.Fluent so that developers that want to use those can, without forcing it to everyone. The downside is that the developer has to know that these methods exist and will not stumble upon them automatically. VS is able to add the namespace almost automatically when using the methods, so the overhead if you want to use these extension methods is very small.