Is there any standard naming convention for VB.NET ?
Based your programming experiences, would like to share your naming convention for VB.NET ?
Are there any guides for this kind of good practice besides patterns & practices Guidance Explorer and Guidance Share ?
Thanks. Happy Weekend.
As Mehrdad said, VB.NET follows the General .NET naming conventions. More specificly:
- Types, events, read-only static fields, methods, namespaces, properties: PascalCase
- Parameters: camelCase
- Acronyms of two characters: DB, with the exception of Id and Ok
- Acronyms of three or more characters: Html or html, depending on context, but never HTML
- Compound words: Hashtable, not HashTable, except for some common terms like FileName
- Do not use separators like hyphens (-) or underscores (_) between words
- Do not use Hungarian notation
I use this guide on "net Naming Conventions and Programming Standards - Best Practices":
http://10rem.net/articles/net-naming-conventions-and-programming-standards---best-practices
VB.NET shares the naming convention of the .NET Framework. PascalCase for types and public stuff, camelCase otherwise.
Enable Visual Studio "Code Analysis" to check your code against several Microsoft-sanctioned naming conventions.
Take a peek at this question. It is essentially the same question regarding C#, however most of of the links and answers provided apply to both languages.