-
Notifications
You must be signed in to change notification settings - Fork 22
SA1206
ptittof57 edited this page Aug 15, 2015
·
2 revisions
<title>SA1206: DeclarationKeywordsMustFollowOrder</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 |
DeclarationKeywordsMustFollowOrder |
CheckId |
SA1206 |
Category |
Ordering Rules |
The keywords within the declaration of an element do not follow a standard ordering scheme.
A violation of this rule occurs when the keywords within an element’s declaration do not follow a standard ordering scheme.
Within an element declaration, keywords must appear in the following order:
Access modifiers
static
All other keywords
Using a standard ordering scheme for element declaration keywords can make the code more readable by highlighting the access level of each element. This can help prevent elements from being given a higher access level than needed.
To fix an instance of this violation, order the keywords in the element’s declaration as described above.
[SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1206:DeclarationKeywordsMustFollowOrder", Justification = "Reviewed.")]
</div>
</body>
- - SA0102 - Clean Install
- - Download
- - Documentation Rules - Layout Rules - Maintainability Rules - Naming Rules - Ordering Rules - Readability Rules - Spacing Rules - Suppressions
- - Adding a custom StyleCop settings page - Adding custom rule settings - Authoring a custom styleCop rule - Authoring rules metadata - Custom CSharp Language Service - Custom MSBuild Integration - Hosting StyleCop in a Custom Environment - Installing a Custom Rule - Integrating StyleCop Into Build Environments - Integrating StyleCop into MSBuild - Writing Custom Rules for StyleCop