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>


    /// This is a comment

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

closed as off-topic by gnat, David Arno, amon, Kilian Foth, Bart van Ingen Schenau Oct 16 '18 at 6:16

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking for assistance in explaining, writing or debugging code are off-topic here. These can be asked on Stack Overflow if they include the desired behavior, a specific problem or error, and the shortest code necessary to reproduce it in the question (see Minimal, Complete, and Verifiable Example)." – gnat, David Arno, amon, Kilian Foth, Bart van Ingen Schenau
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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