C# Coding Style - fields (which naming convention)? #54140
-
In C# Coding Style it states:
However, from Microsoft's Naming Guidelines for Names of Fields it states:
Err, so, these contradict each other. Surely Microsoft's guidelines for C# usage are the ones to follow....but both these docs are authored by Microsoft, right? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
See the first sentence of the Names of Fields section: And the cited C# Coding Style phrase you highlighted: They're not in conflict. The former is about things exposed externally from an assembly, whereas the latter is about implementation detail. |
Beta Was this translation helpful? Give feedback.
See the first sentence of the Names of Fields section:
"The field-naming guidelines apply to static public and protected fields. Internal and private fields are not covered by guidelines"
And the cited C# Coding Style phrase you highlighted:
"for internal and private fields"
They're not in conflict. The former is about things exposed externally from an assembly, whereas the latter is about implementation detail.