Making the ToString paramters optional (IFormattable)#1553
Conversation
- removed the `ToString(IFormatProvider?)` overload from the IQuantity interface - removed the `ToString` overloads from the generated quantities (and HowMuch) - replaced the usages of `ToString(IFormatProvider?)` in the tests
|
Hm, I was expecting there to be a very small size difference compared to #1552, but
I don't know what to make of these numbers.. Anyway, I was also a little surprised by the number of breaking changes that this caused in the tests (non-generated).. I initially found the |
| { | ||
| var meter = Length.FromMeters(5); | ||
| string meterString = meter.ToString(CultureInfo.InvariantCulture); | ||
| string meterString = meter.ToString(null, CultureInfo.InvariantCulture); |
There was a problem hiding this comment.
This I don't like, c# users expect certain ToString() signatures to exist and having to use named parameters or pass null is awkward.
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
|
This PR was automatically closed due to inactivity. |
ToString(IFormatProvider?)overload from theIQuantityinterfaceToStringoverloads from the generated quantities (andHowMuch)ToString(IFormatProvider?)in the testsduplicate of #1552