• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Naming conventions in .NET

SoftwareEng

Senior member
Microsoft has been actively discouraging the use of underscores in function and variable names in .NET, yet in VB.NET almost all event handlers contain underscores:

cmdMakeLove_Click
cboGirls_SelectedIndexChanged

etc. What's up with that?
 
Microsft discourages using _ as the first letter of a variable/function. C++ programmers often use _ to signal that a variable is a member variable.

They also discourage using prefixes like cbo for combo boxes (Hungarian Notation).

But who cares! As long as you make it a standard across your whole application, do what makes sense to you.
 
The lack of conventions in .NET drive me nuts. I'm anal as hell when it comes to code, and a lack of conventions means having to constantly train and monitor developers to make sure everyone is on the same page. Instead of making loose, incomplete, and ambiguous recommendations, it would be nice if Microsoft put forth a standards document that everyone could point to and say "that's how it's done".
 
microsoft did put forth a standards document. it's on msdn. it's specific to building .net class libraries though.
 
Back
Top