Skip to content

Naming Conventions

Overview

Naming conventions should follow Microsoft Standards by default or unless otherwise noted.

Microsoft Standard Naming Guidelines

Highlights

Capitalization Conventions

  • PascalCasing
  • camelCasing

✔️ DO use PascalCasing for all public member, type, and namespace names consisting of multiple words.

✔️ DO use camelCasing for parameter names.

General Naming Conventions

✔️ DO choose easily readable identifier names.

✔️ DO favor readability over brevity.

❌ DO NOT use underscores, hyphens, or any other nonalphanumeric characters.

❌ DO NOT use Hungarian notation.

❌ AVOID using identifiers that conflict with keywords of widely used programming languages.

Namespaces

  • <Company>.(<Product>|<Technology>)[.<Feature>][.<Subnamespace>]

Names of Classes, Structs, and Interfaces

✔️ DO name classes and structs with nouns or noun phrases, using PascalCasing.

✔️ DO name interfaces with adjective phrases, or occasionally with nouns or noun phrases.

❌ DO NOT give class names a prefix (e.g., "C").

✔️ CONSIDER ending the name of derived classes with the name of the base class.

✔️ DO prefix interface names with the letter I, to indicate that the type is an interface.

Back to top