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

QueryClausesMustBeOnSeparateLinesOrAllOnOneLine

CheckId

SA1103

Category

Readability Rules

Cause

The clauses within a C# query expression are not all placed on the same line, and each clause is not placed on its own line.

Rule Description

A violation of this rule occurs when the query clauses are not either placed all on the same line, or each on its own line. For example:

object x = from num in numbers

select num;

The query clauses can correctly be written as:

object x = from num in numbers select num;

or:

object x =

from num in numbers

select num;

How to Fix Violations

To fix a violation of this rule, ensure that all clauses are placed together on the same line, or each clausebegins on its own line.

How to Suppress Violations

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