Select Page

Make C# formatting testable with IFormatProvider

A receipt test can pass on your laptop and fail on another machine because the formatter silently reads the current culture. Make that dependency visible: accept an IFormatProvider, pass it to the formatting operation, and choose the provider at the call site. This...