1

I was looking at the code of C# to create Lists and I noticed they were able to hide, not only comments, but anything else occurring before the function header. On top of this, it was collapsed without a preview, just three dots, on the same line as the function header to conserve space. This is perfect, because I want to conserve space but still have detail comments.

On their code, it was nothing more than:

    // Summary:
    //     Comment
    //     Comment
    public List()

I had copied and pasted what they had done, but go no results. How can I do this?

1 Answers1

1

You can collapse all your code and then stand on your function header and choose to toggle outlining expansion.

To achieve the described behavior do:

CTRL + M+ O for collapses all definitions

Then stand on your function and click CTRL + M + M to toggle outlining expansion for it.

Here is the result:

Hide code before your method

DeJaVo
  • 3,091
  • 2
  • 17
  • 32
  • Yes, of course. But where and how does the shown format get created?? – TaW May 23 '15 at 16:02
  • I know this. But what I'm talking about is having comments, or other such things above a function, such as a [Serializable] tag, that all get collapsed onto the same line as the function header, in only three dots, no preview of what it says. [This is the final result](http://i.imgur.com/qTzL2ST.jpg). The open comments are resulted from expanded anyone of the three dots in front of the function headers. – Austin Bryan May 26 '15 at 12:40
  • Is this vs extension can assist you? https://visualstudiogallery.msdn.microsoft.com/03141ea7-c35e-4533-b05b-9e60545e93eb – DeJaVo May 26 '15 at 12:45