-
Notifications
You must be signed in to change notification settings - Fork 965
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
ByteSize with no overload for subtraction #819
Comments
lucianogaube
added a commit
to lucianogaube/Humanizer
that referenced
this issue
Jun 4, 2019
Add new overload for Minus Operator
11 tasks
clairernovotny
pushed a commit
that referenced
this issue
Jun 21, 2019
Fixes issue #819 (ByteSize with no overload for subtraction) with Unit test
Thank you for the reaction |
It looks like this issue can be closed. 👍 |
jvanrhyn
pushed a commit
to jvanrhyn/Humanizer
that referenced
this issue
Sep 10, 2020
Add new overload for Minus Operator
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The documentation for ByteSize says:
And then follows with an example:
var total = (10).Gigabytes() + (512).Megabytes() - (2.5).Gigabytes();
Unfortunately, it doesn't work and after looking at the source, I can confirm there is an appropriate overload missing for
-
operator.There is, however, a unary operator defined for subtraction so one can achieve the same result with:
var total = (10).Gigabytes() + (512).Megabytes() + -(2.5).Gigabytes();
Could you, please, update the docs or add the overload.
The text was updated successfully, but these errors were encountered: