You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/SA1102.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,21 +27,21 @@ A C# query clause does not begin on the same line as the previous clause, or on
27
27
28
28
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:
29
29
```c#
30
-
objectx=selectainb
30
+
objectx=fromnuminnumbers
31
31
32
-
fromc;
32
+
selectnum;
33
33
```
34
34
35
35
The query clause can correctly be written as:
36
36
```c#
37
-
objectx=selectainbfromc;
37
+
objectx=fromnuminnumbersselectnum;
38
38
```
39
39
or:
40
40
```c#
41
41
objectx=
42
-
selecta
43
-
inb
44
-
fromc;
42
+
fromnum
43
+
innumbers
44
+
selectnum;
45
45
```
46
46
47
47
## How to fix violations
@@ -52,8 +52,8 @@ To fix a violation of this rule, ensure that each clause in the query expression
52
52
53
53
```c#
54
54
#pragmawarningdisable SA1102 // Query clause should follow previous clause
55
-
objectx=selectainb
55
+
objectx=fromnuminnumbers
56
56
57
-
fromc;
57
+
selectnum;
58
58
#pragmawarningrestore SA1102 // Query clause should follow previous clause
0 commit comments