We use SR.Format to format resource strings. But there are a bunch of places where the formatting is done with a specific format provider, e.g. CultureInfo.InvariantCulture, and such places currently use string.Format because there is no SR.Format overload today that takes a format provider.
I suggest we should either add such overloads and switch all formatting of resource strings over to use SR.Format, or we should drop SR.Format and just use string.Format everywhere.
This applies to both coreclr and corefx.
cc: @tarekgh, @krwq
I suggest we should either add such overloads and switch all formatting of resource strings over to use SR.Format, or we should drop SR.Format and just use string.Format everywhere.
I recall we had some logic inside SR.Format for .Net Native when we decide to drop the resources (and use the resource keys only) for the size sake. so we should be careful if we decide to drop SR.Format to ensure we'll not broke anything. I would say adding the overload taking the provider would be better.
This issue was moved to dotnet/corefx#35001
Most helpful comment
I recall we had some logic inside SR.Format for .Net Native when we decide to drop the resources (and use the resource keys only) for the size sake. so we should be careful if we decide to drop SR.Format to ensure we'll not broke anything. I would say adding the overload taking the provider would be better.