I happened across Steve Orr's website which pointed me to several useful MSDN articles.
Some great takeaways regarding what I've been doing wrong include:
1) Naming Conventions, General:
a) Do not use underscores, hyphens, etc.2) Naming Conventions, Upper Case:
b) Use CLR type names, not language-specific names...that means use Int16, not C#'s short
c) Do not prefix with "C" for class or "O" for object like used to in classic VB
a) Do not use Hungarian notation3) Namespaces
b) All objects are pascal-case, except parameters which are camel-case
c) Two letter acronyms are always uppercase unless they are at the beginning of a parameter name, then they match and all stay lowercase
d) Three+ letter acronyms are treated like words (first letter only upper case)
a) Avoid too many or too deep namespaces4) Static Classes:*2
b) Separate advanced namespaces from common namespace by suffixing with "xxx.Advanced"
a) Use static classes sparingly, they are not a miscellaneous bucket5) Property Design
a) Return original value if error encountered6) Parameter Design:
a) Always place out parameters to the right after byval and ref parms...even if inconsistent overloading order
Pascal-Case:
First letter of every word is uppercase (e.g.: SampleObjectName)
Camel-Case:
Same as pascal case, except first letter always lower case (e.g.: sampleObjectName)
No comments:
Post a Comment