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

ParametersMustBeOnSameLineOrSeparateLines

CheckId

SA1117

Category

Readability Rules

Cause

The parameters to a C# method or indexer call or declaration are not all on the same line or each on a separate line.

Rule Description

A violation of this rule occurs when the parameters to a method or indexer are not all on the same line or each on its own line. For example:

public string JoinName(string first, string middle,

string last)

{

}

The parameters can all be placed on the same line:

public string JoinName(string first, string middle, string last)

{

}

public string JoinName(

string first, string middle, string last)

{

}

Alternatively, each parameter can be placed on its own line:

public string JoinName(

string first,

string middle,

string last)

{

}

How to Fix Violations

To fix a violation of this rule, place all parameters on the same line, or place each parameter on its own line.

How to Suppress Violations

[SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1117:ParametersMustBeOnSameLineOrSeparateLines", Justification = "Reviewed.")]
<script type="text/jscript"> WritePageFooter();</script>
Clone this wiki locally