SA1109 - Visual-Stylecop/Visual-StyleCop GitHub Wiki

<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

Cause

A C# statement contains a region tag between the declaration of the statement and the opening curly bracket of the statement.

Rule Description

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.

How to Fix Violations

To fix a violation of this rule, remove the region or move it outside of the statement.

How to Suppress Violations

[SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1109:BlockStatementsMustNotContainEmbeddedRegions", Justification = "Reviewed.")]
    </div>
</body>
⚠️ **GitHub.com Fallback** ⚠️