-
-
Notifications
You must be signed in to change notification settings - Fork 304
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
Price (and other monetary properties) in models should not be type double #74
Comments
Thanks for reporting this! I tend to get doubles and decimals confused, I don't use them much in anything I've built for production. A pull request would certainly be welcome, otherwise I'll get it when I have the chance. |
Decimals are definately the most appropriate type for this. This this might create breaking changes for some. What do you think @nozzlegear? |
I would agree that changing these types to decimal is probably a breaking change, and would warrant waiting until 4.0 for the change to make it in. |
@nozzlegear how can I contribute to 4.0? |
All doubles have been change to decimals in the 4.0 branch. |
It's generally a very-very bad idea to save money (prices, etc) in
double
type. There's adecimal
C# type just for mostly monetary purposes that won't give you calculation, casting, rounding, comparing mistakes thatreal
types will give from time to time.From what I see it's classes:
In case you have other things to do I can fix it on this or next weekend and pull-request.
The text was updated successfully, but these errors were encountered: