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...
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With