Monday, May 7, 2007

Identifire Naming Conventions

Following Casing Styles need to be applied while naming identifires in VB.Net & C#. Detailed guidelines on naming convention in .Net Framework are available at .NET Framework Developer's Guide - General Naming Conventions on Microsoft/MSDN Site.



















































Sr. No. Identifire Casing Example
1. Type Names (Class, Structure, Enums) Pascal UserInfo, AppDomain
2. Enum values Pascal FatalError
3. Events Pascal ValueChanged, StateChanged
4. Exception class Pascal Always ends with the suffix Exception. e.g. MovingViolationException
5. Attrubute Class Pascal Always ends with the suffix Attribute. e.g. AuthorAttribute
6. Interface Pascal Always begins with the prefix I. e.g. IRentals
7. NameSpace Pascal Arnav.BusinessLayer