Skip to content

Commit af76eb5

Browse files
authored
Merge pull request #3697 from bjornhellander/feature/sa1308-doc
Update documentation for SA1308 to also mention prefix "t_"
2 parents 890236e + fce493b commit af76eb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

documentation/SA1308.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717

1818
## Cause
1919

20-
A field name in C# is prefixed with *m_* or *s_*.
20+
A field name in C# is prefixed with *m_*, *s_*, or *t_*.
2121

2222
## Rule description
2323

24-
A violation of this rule occurs when a field name is prefixed by *m_* or *s_*.
24+
A violation of this rule occurs when a field name is prefixed by *m_*, *s_*, or *t_*.
2525

2626
By default, StyleCop disallows the use of underscores, *m_*, etc., to mark local class fields, in favor of the 'this.' prefix. The advantage of using 'this.' is that it applies equally to all element types including methods, properties, etc., and not just fields, making all calls to class members instantly recognizable, regardless of which editor is being used to view the code. Another advantage is that it creates a quick, recognizable differentiation between instance members and static members, which will not be prefixed.
2727

0 commit comments

Comments
 (0)