SA1102: Query clause should follow previous clause
Cause
A C# query clause does not begin on the same line as the previous clause, or on the next line.
Rule description
A violation of this rule occurs when a clause within a query expression does not begin on the same line as the previous clause, or on the line after the query clause. For example:
object x = from num in numbers
select num;
The query clause 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 each clause in the query expression begins on the same line as the previous clause, or on the following line.
How to suppress violations
#pragma warning disable SA1102 // Query clause should follow previous clause
object x = from num in numbers
select num;
#pragma warning restore SA1102 // Query clause should follow previous clause