| TypeName | SA1311StaticReadonlyFieldsMustBeginWithUpperCaseLetter |
| CheckId | SA1311 |
| Category | Naming Rules |
The name of a static readonly field does not begin with an upper-case letter.
A violation of this rule occurs when the name of a static readonly field begins with a lower-case letter.
C# 8 added readonly members for structs; this rule still only targets static readonly fields and ignores readonly methods, properties, indexers, or events. Accessible static readonly fields can also trigger SA1307, while SA1304 does not report static readonly fields. This prevents all three naming rules from firing on the same field while keeping static readonly fields covered.
To fix a violation of this rule, change the name of the field so that it begins with an upper-case letter.
[SuppressMessage("StyleCop.CSharp.NamingRules", "SA1311:StaticReadonlyFieldsMustBeginWithUpperCaseLetter", Justification = "Reviewed.")]#pragma warning disable SA1311 // StaticReadonlyFieldsMustBeginWithUpperCaseLetter
#pragma warning restore SA1311 // StaticReadonlyFieldsMustBeginWithUpperCaseLetter