diff --git a/_rules/2201.md b/_rules/2201.md index 0f97df80..36be76c5 100644 --- a/_rules/2201.md +++ b/_rules/2201.md @@ -4,6 +4,6 @@ rule_category: dotnet-framework-usage title: Use C# type aliases instead of the types from the `System` namespace severity: 1 --- -For instance, use `object` instead of `Object`, `string` instead of `String`, and `int` instead of `Int32`. These aliases have been introduced to make the primitive types first class citizens of the C# language, so use them accordingly. +For instance, use `object` instead of `Object`, `string` instead of `String`, and `int` instead of `Int32`. These aliases have been introduced to make the primitive types first class citizens of the C# language, so use them accordingly. When referring to static members of those types, use `int.Parse()` instead of `Int32.Parse()`. -**Exception:** When referring to static members of those types, it is custom to use the full CLS name, e.g. `Int32.Parse()` instead of `int.Parse()`. The same applies to members that need to specify the type they return, e.g. `ReadInt32`, `GetUInt16`. +**Exception:** For interop with other languages, it is custom to use the [CLS-compliant name](https://docs.microsoft.com/en-us/dotnet/standard/common-type-system) in type and member signatures, e.g. `HexToInt32Converter`, `GetUInt16`.