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/SA1300.md
+21-6Lines changed: 21 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,15 +21,30 @@ The name of a C# element does not begin with an upper-case letter.
21
21
22
22
## Rule description
23
23
24
-
A violation of this rule occurs when the names of certain types of elements do not begin with an upper-case letter. The following types of elements should use an upper-case letter as the first letter of the element name: *namespaces, classes, enums, structs, delegates, events, methods,* and *properties*.
25
-
26
-
In addition, any field which is public, internal, or marked with the const attribute should begin with an upper-case letter. Non-private readonly fields must also be named using an upper-case letter.
27
-
28
-
If the field or variable name is intended to match the name of an item associated with Win32 or COM, and thus needs to begin with a lower-case letter, place the field or variable within a special *NativeMethods* class. A NativeMethods class is any class which contains a name ending in NativeMethods, and is intended as a placeholder for Win32 or COM wrappers. StyleCop will ignore this violation if the item is placed within a NativeMethods class.
24
+
A violation of this rule occurs when the names of certain types of elements do not begin with an upper-case letter. The
25
+
following types of elements should use an upper-case letter as the first letter of the element name:
26
+
27
+
* Namespaces
28
+
* Classes
29
+
* Enums
30
+
* Structs
31
+
* Delegates
32
+
* Events
33
+
* Methods
34
+
* Properties
35
+
36
+
In addition, any field which is public, internal, or marked with the const attribute should begin with an upper-case
37
+
letter. Non-private readonly fields must also be named using an upper-case letter.
38
+
39
+
If the field or variable name is intended to match the name of an item associated with Win32 or COM, and thus needs to
40
+
begin with a lower-case letter, place the field or variable within a special `NativeMethods` class. A `NativeMethods`
41
+
class is any class which contains a name ending in `NativeMethods`, and is intended as a placeholder for Win32 or COM
42
+
wrappers. StyleCop will ignore this violation if the item is placed within a `NativeMethods` class.
29
43
30
44
## How to fix violations
31
45
32
-
To fix a violation of this rule, change the name of the element so that it begins with an upper-case letter, or place the item within a NativeMethods class if appropriate.
46
+
To fix a violation of this rule, change the name of the element so that it begins with an upper-case letter, or place
47
+
the item within a `NativeMethods` class if appropriate.
0 commit comments