SA1203.md
June 22, 2017 ยท View on GitHub
SA1203
| TypeName | SA1203ConstantsMustAppearBeforeFields |
| CheckId | SA1203 |
| Category | Ordering Rules |
Cause
A constant field is placed beneath a non-constant field.
Rule description
A violation of this rule occurs when a constant field is placed beneath a non-constant field. Constants should be placed above fields to indicate that the two are fundamentally different types of elements with different considerations for the compiler, different naming requirements, etc.
How to fix violations
To fix an instance of this violation, place all constants above all fields.
How to suppress violations
[SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1203:ConstantsMustAppearBeforeFields", Justification = "Reviewed.")]
#pragma warning disable SA1203 // ConstantsMustAppearBeforeFields
#pragma warning restore SA1203 // ConstantsMustAppearBeforeFields