You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm watching your course on pluralsight and it gave me a lot of good ideas on how to implement what you've done in your sample project that i can apply in my future projects. Good stuff...
I just have some questions on Dollars operators particularly the operator *.
. If i pass a negative multiplier, the Dollars class is now in invalid state because it is negative. Shouldn't the statement be a call to static Create so that it will still go the validation checks?
The text was updated successfully, but these errors were encountered:
It should, I've done a mistake here. Both operators (* and +) should call Create. There's also a potential issue with multiplying a e.g. $0.99 value with 0.75 discount. It results in a price that contains a fraction of a cent which is not allowed by Dollars. operator * must round such values to avoid the fractioning.
Hi,
I'm watching your course on pluralsight and it gave me a lot of good ideas on how to implement what you've done in your sample project that i can apply in my future projects. Good stuff...
I just have some questions on Dollars operators particularly the operator *.
AnemicDomainModel/After/src/Logic/Customers/Dollars.cs
Line 37 in 89f8abd
The text was updated successfully, but these errors were encountered: