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

ClosingParenthesisMustBeOnLineOfOpeningParenthesis

CheckId

SA1112

Category

Readability Rules

Cause

The closing parenthesis or bracket in a call to a C# method or indexer, or the declaration of a method or indexer, is not placed on the same line as the opening bracket when the element does not take any parameters.

Rule Description

A violation of this rule occurs when a method or indexer does not take any parameters andthe closing bracket of a call or declaration for the method or indexer is not placed on the same line as the opening bracket. The following example shows correct placement of the closing parenthesis:

public string GetName()

{

return this.name.Trim();

}

How to Fix Violations

To fix a violation of this rule, ensure that the closing bracket is placed on the same line as the opening bracket.

How to Suppress Violations

[SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1112:ClosingParenthesisMustBeOnLineOfOpeningParenthesis", Justification = "Reviewed.")]
    </div>
</body>
Clone this wiki locally