SA1123 - Visual-Stylecop/Visual-StyleCop GitHub Wiki
<title>SA1123: DoNotPlaceRegionsWithinElements</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 |
DoNotPlaceRegionsWithinElements |
CheckId |
SA1123 |
Category |
Readability Rules |
The C# code contains a region within the body of a code element.
A violation of this rule occurs whenever a region is placed within the body of a code element. In many editors, including Visual Studio, the region will appear collapsed by default, hiding the code within the region. It is generally a bad practice to hide code within the body of an element, as this can lead to bad decisions as the code is maintained over time.
To fix a violation of this rule, remove the region from the code.
[SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1123:DoNotPlaceRegionsWithinElements", Justification = "Reviewed.")]