Three forward slashes for block commenting?

前端 未结 3 738
别那么骄傲
别那么骄傲 2020-12-17 18:38

First noticed this in Notepad++, where // comments and /// comments were shown in different colours.
Doxygen revealed more about it, but I\'m n

相关标签:
3条回答
  • 2020-12-17 18:51

    In Visual Studio the /// indicates documentation not just comments. Following your link the explanation is the same. It is used to adorn comments that will be specifically formatted via your editor or some other tool as documentation for a class, method, namespace, etc.

    0 讨论(0)
  • 2020-12-17 18:52

    The author might intend to put documentation after ///

    At where I work, we use 3 styles of doxygen comment blocks for documentation because lack of coding style guidelines.

    1. ///
    2. //!
    3. /** */
    0 讨论(0)
  • 2020-12-17 19:05
    1. Surely, its easier to hit the same key thrice than hitting two separate keys.
    2. Don't know about other IDEs, but XCode4 supports code snippets where you can type pretty much anything. On Visual Studio, I use Visual Assist X, which gives me the same thing. XCode4 Example,Visual AssistX example. I'd have to assume other IDEs provide similar functionality.

    That said, yes I have come across triple slashes too and they are generally used to indicate comments that an auto-documentation system like doxygen would pick.

    0 讨论(0)
提交回复
热议问题