C# coding style: comments

后端 未结 10 1424
后悔当初
后悔当初 2021-01-17 15:59

Most C# style guides recommend against the /* ... */ commenting style, in favor of // or ///. Why is the former style to be avoided?

10条回答
  •  有刺的猬
    2021-01-17 16:13

    I always use // for actual COMMENTS, while I save the /* */ for code I temporarily do not want to run for debugging/development purposes.

    By using only //, then you can be sure you can comment out a large block of lines/methods etc without nesting comments and making your compiler cry.

提交回复
热议问题