For me, No.1 should be code folding.
#region xxx #endregion
Suddenly, people find excuse for having large classes (files) because they can "organize" them beautifully. Once I saw a half-page class with 3,000 lines. I was speechless and they looked like "what problem"?
No.2 is a partial class. This is a really nice feature, especially when you work with generated code. However, some people use it to βbreak downβ a class into several parts. What for? Because this class is so large and popular that it is always locked in the original control. Instead of splitting the class into several smaller classes, they create several files, such as my_Class1.cs, your_Class1.cs, etc., so that people can work with Class1 at the same time.
I would like to include "Copy & Paste", but this is not a Visual Studio bug ...
c # visual-studio
Kai wang
source share