Visual Studio C# statement collapsing

前端 未结 12 1992
闹比i
闹比i 2020-11-30 17:23

When editing really long code blocks (which should definitely be refactored anyway, but that\'s beyond the scope of this question), I often long for the ability to collapse

12条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-30 18:10

    You can collapse specific blocks of text within visual studio, but you have to turn off automatic outlining.

    Right click in your code window and select (Outlining | Stop Outlining)

    Then, select some text, right click and select (Outlining | Hide Selection)

    When you turn on automatic outlining again, your custom "Regions" will no longer collapse.

提交回复
热议问题