I am working on C# programming assignment for college. Part of my final for the class. The prof gave us a program, that works, but is very poorly written. We have to clean up the code and add our own flair to it, but we have to do so with the original code, so that the prof can follow what we changed where.
Many of the methods have large chunks of redundant code that could be thrown into another method, once, then called on when needed.
I am commenting it all out, but it it easily takes up 80% of form.cs.
This leads me to my question:
Is there an easy way to add the plus sign drop downs so that I can collapse all the large comment blocks.
I am using MS Visual Studio 2008 Pro.
Thank you in advance for your help.
Use regions.
#region
// Block you want to expand/collapse
#endregion
You could add regions:
#region Commented out Method
//
//
//
#endregion
but I also think that if you use the
/* */
commenting notation, VS 2008 will automatically add the collapsible control to the sidebar of your code. I don't have VS 2008 currently to test that out but VS 2010 does that.
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