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/SA1202.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,27 +17,27 @@
17
17
18
18
## Cause
19
19
20
-
An element within a C# code file is out of order within regard to access level, in relation to other elements in the code.
20
+
An element within a C# code file is out of order within regard to access level, in relation to other elements in the
21
+
code.
21
22
22
23
## Rule description
23
24
24
-
A violation of this rule occurs when the code elements within a file do not follow a standard ordering scheme based on access level.
25
+
A violation of this rule occurs when the code elements within a file do not follow a standard ordering scheme based on
26
+
access level.
25
27
26
28
To comply with this rule, adjacent elements of the same type must be positioned in the following order by access level:
27
29
28
-
*public*
30
+
* public
31
+
* internal
32
+
* protected internal
33
+
* protected
34
+
* private
29
35
30
-
*internal*
36
+
:memo: Static constructors and explicitly implemented interface members are considered *public* for the purposes of this
37
+
rule.
31
38
32
-
*protected internal*
33
-
34
-
*protected*
35
-
36
-
*private*
37
-
38
-
39
-
40
-
Complying with a standard ordering scheme based on access level can increase the readability and maintainability of the file and make it easier to identify the public interface that is being exposed from a class.
39
+
Complying with a standard ordering scheme based on access level can increase the readability and maintainability of the
40
+
file and make it easier to identify the public interface that is being exposed from a class.
0 commit comments