Globalization Rules rule set for managed code
Applies to: Visual Studio Visual Studio for Mac
Note
This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
Use the Microsoft Globalization Rules rule set to focus on problems that might prevent data in your application from appearing correctly in different languages, locales, and cultures. You should include this rule set if your application is localized, globalized, or both.
Rule | Description |
---|---|
CA1303 | Do not pass literals as localized parameters |
CA1304 | Specify CultureInfo |
CA1305 | Specify IFormatProvider |
CA1307 | Specify StringComparison for clarity |
CA1308 | Normalize strings to uppercase |
CA1309 | Use ordinal StringComparison |
CA1310 | Specify StringComparison for correctness |
CA2101 | Specify marshaling for P/Invoke string arguments |