Specify format provider

TypeName SpecifyFormatProvider
CheckId BC1006
Category Globalization
Breaking NonBreaking

This rule is meant to replace the Microsoft-provided SpecifyCultureInfo and SpecifyIFormatProvider rules. This rule differs from the Microsoft-provided rules in three important ways (https://connect.microsoft.com/VisualStudio/feedback/details/270833/specifyiformatprovider-rule-improvements):
  1. It screens for overloads that add an IFormatProvider argument or any class that implements IFormatProvider (including CultureInfo).
  2. It detects the presence of an IFormatProvider parameter at any position in the parameter list of a candidate overload.
  3. It includes renamed methods (e.g.: an explicit interface method implementation via a renamed method in VB) when screening for overloads.

See the documentation for the SpecifyCultureInfo and SpecifyIFormatProvider rules for problem and fix details.

Last edited Feb 20, 2010 at 2:34 AM by calinoiu, version 2


No comments yet.