3

Spoiler alert: Outlining is not what I'm searching for.

Context

I'm a great fan of Code Contracts, at least on a philosophical level, but sometimes the amount of code-contract statements gets to a level where the readability of the core functional code feels significantly impaired.

The same thing goes for when you are doing the xml-docs as you should, I've noticed that a high amount of fluff between the purely functional parts of the code can significantly reduce the efficient perception of the functional aspect of the code.

Now of course we can use outlining to at least reduce the amount of visible xml-docs in that case, although I'd argue that it would be more beneficial if you could tell VS to hide those lines totally and reduce the complexity of using the outlining tool for the functional aspect of the code that you sometime might want to focus on.

And of course, outlining does not work in cases like code-contracts, unless you try to wrap these in regions, and consequently introducing even more overhead.

Question

Do Visual Studio have any infrastructure that would make it possible to completely hide certain lines of code while maintaining correct line-numbering with markings of hidden lines in a way separated from the outlining functionality?

A couple of toggle-buttons somewhere to totally hide stuff like xml-docs and code-contracts would be totally awesome, even more awesome if you manually can configure what to hide, like custom logging function calls.

Alex
  • 14,104
  • 11
  • 54
  • 77
  • I love negative feedback like a downvote, but it would be so much valuable with a little comment attached to it as well. – Alex May 22 '15 at 13:24
  • This looks interesting: http://stackoverflow.com/questions/8696586/c-sharp-hide-and-unhide-comments – BJ Myers May 22 '15 at 23:16

0 Answers0