问题
I'm sure this is a foolish question, but I can't seem to find an answer. I'm required to print out my code for a program, but I want to not print regions that are collapsed, as this would save about a dozen pages of paper per print. Where is the setting in Visual Studio 2015 to do this, if there is one? I am working in C#.
回答1:
Cut/Paste your collapsed regions into functions and put those functions into a different file. Its easy "low lying fruit" in terms of refactoring and making you code so much easier to read.
Regions are like totally gross
回答2:
Prior to VS2015, the option to hide collapsed regions while printing was available on the Print dialog (as discussed here). Unfortunately, however, that feature has been removed (as noted in the "Known Issues" section of this release). Please consider voting to restore this capability on this UserVoice Request.
来源:https://stackoverflow.com/questions/42430065/how-do-i-not-print-collapsed-code-regions-in-visual-studio-2015