Geeks With Blogs
Scott Wojan DotRant BLOG

(I know I'm setting myself up for at least one shot at me)
My #1 biggest pet peeve is C# naming conventions!!

Field Variables
Man does it drive me bonkers to find field variables with a prefix like _MyVariable or even worse m_MyVariable.  Arrrgh, it hurts just to even type it!  What does the underscore do for you?  Tell you that it's a field variable?  Why not have ÞMyVariable or or zæMyVariable?  Those are just as arbitrary as an underscore or m underscore.  If you can't determine the variable is a field variable from the code you're in, I'd say that your method or class has become too bloated and could use some refactoring.  Personally, I stick to field variables using camelCase and if it needs it, the property accessor with PascalCase.  So myVariable and MyVariable.  No other crazy characters needed!

Reference Types
If it isn't a value type, then it's a reference type and eventually down the inheritance tree its great grandpappy is Object.  Why oh why do I run across stuff like Customer objCustomer = new Customer();  I look at this and read "Object Customer is a Customer Object".  Come on people, this isn't an untyped scripting language!!

So, what gets your blood boiling out there in coding land?

Posted on Thursday, June 29, 2006 6:16 PM Rants | Back to top

Copyright © Scott Wojan | Powered by: