Let\'s say, we have a variable, which we want named Fubar
Let\'s say that Fubar
is a String
!
That means, we would define F
Well, the Framework Design Guidelines document states the following:
Names of Fields The field-naming guidelines apply to static public and protected fields. Internal and private fields are not covered by guidelines, and public or protected instance fields are not allowed by the member design guidelines.
✓ DO use PascalCasing in field names.
✓ DO name fields using a noun, noun phrase, or adjective.
X DO NOT use a prefix for field names.
For example, do not use "g_" or "s_" to indicate static fields.
So, for private fields, there is no official recommendation. However, if you use VS 2017 quick action "Convert to full property" on a property, this happens:
So it seems like it is safe to assume that prefixing private fields with an underscore is somewhat standard.