#960 – Conventions for Naming Classes

Below are the typical conventions used when naming classes:

  • Use PascalCasing
    • Capitalize first letter of each word
    • Capitalize only first letter of 3+ letter acronyms
  • Use a singular noun or noun phrase
  • Don’t use underscores
  • Don’t use abbreviations
  • Don’t prefix the name with any special character (e.g. CPerson)

Here are some examples of class names that follow these guidelines:

  • LogFile
  • Book
  • BookChapter
  • ComplexNumber
Advertisement

About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: