-
Notifications
You must be signed in to change notification settings - Fork 23
SA1109
ptittof57 edited this page Aug 15, 2015
·
4 revisions
<title>SA1109: BlockStatementsMustNotContainEmbeddedRegions</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 |
BlockStatementsMustNotContainEmbeddedRegions |
CheckId |
SA1109 |
Category |
Readability Rules |
A C# statement contains a region tag between the declaration of the statement and the opening curly bracket of the statement.
A violation of this rule occurs when the code contains a region tag in between the declaration and the opening curly bracket. For example:
if (x != y)
#region
{
}
#endregion
This will result in the body of the statement being hidden when the region is collapsed.
To fix a violation of this rule, remove the region or move it outside of the statement.
[SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1109:BlockStatementsMustNotContainEmbeddedRegions", 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