Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Review misleading field names

TypeName

ReviewMisleadingFieldNames

CheckId

CA1504

Category

Microsoft.Maintainability

Breaking Change

Non Breaking

The name of an instance field starts with "s_" or the name of a static (Shared in Visual Basic) field starts with "m_".

Field names that start with "s_" are associated with static data by many users. Similarly, field names that start with "m_" are associated with instance (member) data. For more easily maintained code, names should follow commonly used conventions.

To fix a violation of this rule, rename the field using the appropriate prefix. Alternatively, make the field agree with the current suffix by adding or removing the static modifier.

Do not suppress a warning from this rule.

Community Additions

ADD
Show:
© 2015 Microsoft