TypeName | SA1109BlockStatementsMustNotContainEmbeddedRegions |
CheckId | SA1109 |
Category | Readability Rules |
A C# statement contains a region tag between the declaration of the statement and the opening brace of the statement.
A violation of this rule occurs when the code contains a region tag in between the declaration and the opening brace. 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.")]
#pragma warning disable SA1109 // BlockStatementsMustNotContainEmbeddedRegions
#pragma warning restore SA1109 // BlockStatementsMustNotContainEmbeddedRegions