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

ClosingParenthesisMustBeSpacedCorrectly

CheckId

SA1009

Category

Spacing Rules

Cause

A closing parenthesis within a C# statement is not spaced correctly.

Rule Description

A violation of this rule occurs when the closing parenthesis within a statement is not spaced correctly.

A closing parenthesis should never be preceded by whitespace. In most cases, a closing parenthesis should be followed by a single space, unless the closing parenthesis comes at the end of a cast, or the closing parenthesis is followed by certain types of operator symbols, such as positive signs, negative signs, and colons.

If the closing parenthesis is followed by whitespace, the next non-whitespace character must not be an opening or closing parenthesis or square bracket, or a semicolon or comma.

How to Fix Violations

To fix a violation of this rule, ensure that the spacing around the closing parenthesis follows the rule described above.

How to Suppress Violations

[SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1009:ClosingParenthesisMustBeSpacedCorrectly", Justification = "Reviewed.")]
    </div>
</body>
Clone this wiki locally