-
Notifications
You must be signed in to change notification settings - Fork 23
SA1207
TypeName |
ProtectedMustComeBeforeInternal |
CheckId |
SA1207 |
Category |
Ordering Rules |
The keyword protected is positioned after the keyword internal within the declaration of a protected internal C# element.
A violation of this rule occurs when a protected internal element’s access modifiers are written as internal protected. In reality, an element with the keywords protected internal will have the same access level as an element with the keywords internal protected. To make the code easier to read and more consistent, StyleCop standardizes the ordering of these keywords, so that a protected internal element will always be described as such, and never as internal protected. This can help to reduce confusion about whether these access levels are indeed the same.
To fix an instance of this violation, place the protected keyword before the internal keyword.
[SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1207:ProtectedMustComeBeforeInternal", Justification = "Reviewed.")]
- - 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