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

SplitParametersMustStartOnLineAfterDeclaration

CheckId

SA1116

Category

Readability Rules

Cause

The parameters to a C# method or indexer call or declaration span across multiple lines, but the first parameter does not start on the line after the opening bracket.

Rule Description

A violation of this rule occurs when the parameters to a method or indexer span across multiple lines, but the first parameter does not start on the line after the opening bracket. For example:

public string JoinName(string first,

string last)

{

}

The parameters must begin on the line after the declaration, whenever the parameter span across multiple lines:

public string JoinName(

string first,

string last)

{

}

How to Fix Violations

To fix a violation of this rule, ensure that the first parameter starts on the line after the opening bracket, or place all parameters on the same line if the parameters are not too long.

How to Suppress Violations

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