块注释的三个斜杠? [英] Three forward slashes for block commenting?

查看:788
本文介绍了块注释的三个斜杠?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Notepad ++中首先注意到这一点,其中 // 注释和 /// 注释以不同的颜色显示。

Doxygen 透露了更多关于它,但我不相信它的功效。

1.为什么任何人都会使用三斜线注释风格,当它更容易键入 / * * / ? (

2.为了使用,编辑器支持块注释的三重斜杠Visual Studio支持 Ctrl + k Ctrl + c 多行注释的方式?

First noticed this in Notepad++, where // comments and /// comments were shown in different colours.
Doxygen revealed more about it, but I'm not convinced about its efficacy.
1. Why would anyone use the three slashing commenting style when it's far easier to type /* and */? (I figure there has to be a better explanation than it being useful when nesting comments)
2. For it to be usable, do editors support block commenting for triple slashes in the way that Visual Studio has support for Ctrl+k Ctrl+c for multi-line comments?

推荐答案

在Visual Studio中, /// 表示文档不仅仅是评论。跟随你的链接的解释是一样的。它用于装饰注释,这些注释将通过编辑器或其他工具作为类,方法,命名空间等的文档进行特殊格式化。

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.

这篇关于块注释的三个斜杠?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆