Fields

  • DO use PascalCasing in public and _underScore in private, protected, internal, and protected internal field names.

  • DO name fields using a noun, noun phrase, or adjective.

  • DO always specify the visibility, even if it’s the default.

    e.g. private string _count not string _count
    
  • ✅ Field initializers are generally encouraged.

  • DO NOT use a prefix for field names. For example, do not use “g_” or “s_” to indicate static fields.

Learn More