.NET Code Naming Conventions
-
Classes, methods, and properties should all be proper-case. Do not use a "C" prefix in front of a class name.
-
Local variables should be camel-case (the first letter of the first word is lower-case, while the first letter of each succeeding word is proper-case; i.e. Dim firstName As String).
-
Private or member variables should be camel-case and begin with an underscore (i.e. Private _constituentID As Guid).
-
No Hungarian notation. If you're not familiar with the term, Hungarian notation is the practice of prefixing variable names with a letter or letters that describe its data type (i.e. Dim sName As String). Instead of using this notation, try to make the variable name more descriptive of its use and not its type (i.e. Dim sFld As String: Bad; Dim filterFieldName As String: Good). For Booleans, use a verb phrase to indicate its use (i.e. Dim bValid As Boolean: Bad; Dim isValid As Boolean: Good).
-
Avoid abbreviations when possible. Exceptions to this are abbreviations that are more prevalent than the word they represent (i.e. "ID" instead of "Identifier").
-
Enums should be singular and not prefixed with an "E." Example:
Public Enum HairColor
Black
Brown
Blonde
Gray
End Enum
For more information on .NET Naming Conventions and Programming Standards, see:
http://msdn.microsoft.com/en-us/library/xzf533w0(vs.71).aspx
http://www.amazon.com/Framework-Design-Guidelines-Conventions-Libraries/dp/0321545613/