Most C# style guides recommend against the /* ... */ commenting style, in favor of // or ///. Why is the former style to be avoided?
/* */
is fine for multi-line code blocks. For instance at the top of a code file, copyright info etc.
//
is easier for single line.
Always use ///
for at least all public members in a class as your XML documentation gets generated from that from which you can create help files.
One example that comes to mind is that it's possible to accidentally interrupt a /*
style comment. For example
/* This is the start of a comment that documents the
behavior of the +-*/ operators in our program
*/
This code does not compile, while the //
variant would. Also the ///
represents a specific style of documentation to which external tools respond differently.
My guess is because one requires explicit syntax on EACH line and one creates comments that can comment out large sections of code if the closing */
is not used. It's just not as safe.
My opinion is that "//" is just easier to type in than /**/