TypeName | SX1309FieldNamesMustBeginWithUnderscore |
CheckId | SX1309 |
Category | Naming Rules (Alternative) |
This rule is a non-standard extension to the default StyleCop behavior, and represents an alternative style which is adopted by some projects. Alternative rules are known to directly conflict with standard StyleCop rules.
A field name does not begin with an underscore.
A violation of this rule occurs when a field name does not begin with an underscore.
This rule only checks the name of private instance fields.
The fix an instance of this violation, add an underscore (_
) prefix to the name of the field.
#pragma warning disable SX1309 // Field names should begin with underscore
int bar;
#pragma warning restore SX1309 // Field names should begin with underscore