Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions documentation/SA1102.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ A C# query clause does not begin on the same line as the previous clause, or on

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:
```c#
object x = select a in b
object x = from num in numbers

from c;
select num;
```

The query clause can correctly be written as:
```c#
object x = select a in b from c;
object x = from num in numbers select num;
```
or:
```c#
object x =
select a
in b
from c;
from num
in numbers
select num;
```

## How to fix violations
Expand All @@ -52,8 +52,8 @@ To fix a violation of this rule, ensure that each clause in the query expression

```c#
#pragma warning disable SA1102 // Query clause should follow previous clause
object x = select a in b
object x = from num in numbers

from c;
select num;
#pragma warning restore SA1102 // Query clause should follow previous clause
```