views:

257

answers:

4

For me, No.1 has to be code folding.

#region xxx
#endregion

All of sudden, people find an excuse to have big classes(files) because they can "organize" them nicely. I once saw a half-page-long class with 3,000 lines. I was speechless and they were like "what's the problem"?

No.2 is partial class. It's actually a nice feature especially when you work with generated code. However, some people use it to "break down" a class to multiple pieces. Why? Because that class is so big and popular that it's always locked in the source control. Instead of breaking down the class into different smaller classes, they create multiple files like my_Class1.cs, your_Class1.cs etc so that people can work on Class1 at the same time.

I would like to include "Copy&Paste" but it's not Visual Studio's fault...

A: 

I think the most abused feature would be using the default templates as is. Many of the templates include "partial" as well as the regions and include/using statements that aren't required by the code inside of the class.

After that, I'd have to agree with the #region blocks; however, those CAN be useful if done properly. Usually though they are used as a means to organize classes that are larger than they probably should be.

JamesEggers
+1  A: 

Next to #region blocks I would say the ASP.NET IDataSource implementations (SqlDataSource, LinqDataSource) that force (allow) you to write data-access code directly into your aspx pages. I would not use this even for a really small demo app, but nowhere in the documentation of these classes is it mentioned that for a well-designed application you should not use these classes.

Ronald Wildenberg
A: 

Not paying attention to Warnings

Pat
Only because there is always sooo many of them...
User
A: 

Graphical editor for WebForms. Spoiled so many potentially good developers into drag-and-drop monkeys.

User