Skip to content
ptittof57 edited this page Aug 15, 2015 · 3 revisions
<title>SA1203: ConstantsMustAppearBeforeFields</title> <script src="script/helpstudio.js" type="text/javascript"></script> <script src="script/StandardText.js" type="text/jscript"></script>
<script type="text/jscript">WritePageTop(document.title);</script>

TypeName

ConstantsMustAppearBeforeFields

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 must 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.")]
Clone this wiki locally