Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between // and /// in Visual Studio?

Stylecop is telling me to use /// instead of // when I´m commenting. What is the semantic difference for those two and when should I use which one?

like image 774
LDomagala Avatar asked Feb 18 '09 00:02

LDomagala


1 Answers

// denotes your own personal comments, where /// denote comments that can contain special data, e.g. markup for interpretation by Visual Studio - like:

/// <summary>
/// This class does something.
/// </summary>
class Bob {
    ...
}

This will tell Visual Studio the summary of the Bob class, and that will then show up in your code completion box.

like image 167
Fritz H Avatar answered Sep 20 '22 13:09

Fritz H