Skip to content
ptittof57 edited this page Aug 15, 2015 · 4 revisions
<title>SA1513: ClosingCurlyBracketMustBeFollowedByBlankLine</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

ClosingCurlyBracketMustBeFollowedByBlankLine

CheckId

SA1513

Category

Layout Rules

Cause

A closing curly bracket within a C# element, statement, or expression is not followed by a blank line.

Rule Description

To improve the readability of the code, StyleCop requires blank lines in certain situations, and prohibits blank lines in other situations. This results in a consistent visual pattern across the code, which can improve recognition and readability of unfamiliar code.

A violation of this rule occurs when a closing curly bracket is not followed by a blank line. For example:

public bool Enabled

{

get

{

return this.enabled;

}}

The code above would generate one instance of this violation, since there is one place where a closing curly bracket is not followed by a blank line.

How to Fix Violations

To fix a violation of this rule, ensure a blank line follows closing curly brackets.

How to Suppress Violations

[SuppressMessage("StyleCop.CSharp.LayoutRules", "SA1513:ClosingCurlyBracketMustBeFollowedByBlankLine", Justification = "Reviewed.")]
    </div>
</body>
Clone this wiki locally