The following rules give an overview of the class naming rules:
- Use a noun or noun phrase to name a class.
- Use Pascal case.
- Avoid abbreviations.
- Do not use the type prefix. For example, use the C prefix before the class. For example, use the class name filestream instead of cfilestream.
- Do not use underscores (_).
- Occasionally, even if a class is not an interface, you must provide a class name starting with the letter I. As long as I is the first letter of a class name word, this is acceptable. For example, the class name identitystore is acceptable.
- Use composite words to name the derived class. The second part of the derived class should be the name of the base class. For example, applicationexception is suitable for the name of a class derived from the class named exception because applicationexception is a type of exception. Make reasonable judgments when using this rule. For example, a button is a proper name for a class derived from a control. Although a button is a type of control, using control as a class name will make the class name grow unnecessary.
The following is an example of a correct naming class.
[Visual Basic]
Public class filestreamclass filestream
Public class buttonclass button
Public class stringclass string
[C #]
Public class filestream
Public class button
Public class string
Original article: Class naming guidelines