1

I like the documenting feature you get with /// comments, but hate the boilerplate.

Is there a way to make visual studio just use whatever comment is above a class as the documentation, without adding two lines of boilerplate to your code?

    /// <summary>
    /// This is a comment
    /// </summary>

vs

    /// This is a comment

3x vertical space savings! Or more, if you put the comment on the same line.

  • 2
    see Where does my tool question go? – gnat Oct 16 '18 at 5:31
  • Note that the XML does have a purpose. You can, for example, generate documentation with it. – Robert Harvey Oct 16 '18 at 15:45
  • I think that's the problem. The code comment already is documentation - but to enable other VS features the need to xml-ify it by adding <summary> actually makes it harder to read. I think the real question the poster has is how can they have generated documentation without sacrificing the readability of in-source documentation when using visual studio. – Benedict Oct 17 '18 at 15:56