vb.net 在 Visual Basic 中如何创建块注释
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13477958/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
In Visual Basic how do you create a block comment
提问by Coops
Possible Duplicate:
commenting VB code
可能重复:
注释 VB 代码
Does anybody know how to do a block comment in Visual Basic?
有人知道如何在 Visual Basic 中进行块注释吗?
Note: I did a few searches on here and neither those results nor the results for 'Questions that may already have your answer' appeared to ask this question
注意:我在这里进行了一些搜索,这些结果和“可能已经有答案的问题”的结果似乎都没有问这个问题
回答by Oded
There is no block comment in VB.NET.
VB.NET 中没有块注释。
You need to use a '
in front of every line you want to comment out.
您需要'
在要注释掉的每一行前面使用 a 。
In Visual Studio you can use the keyboard shortcuts that will comment/uncomment the selected lines for you:
在 Visual Studio 中,您可以使用键盘快捷键为您注释/取消注释所选行:
Ctrl + K, Cto comment
Ctrl + K, C评论
Ctrl + K, Uto uncomment
Ctrl + K, U取消注释
回答by Jon
There's not a way as of 11/2012, HOWEVER
然而,截至 2012 年 11 月,没有办法
Highlight Text (In visual Studio.net)
突出显示文本(在 Visual Studio.net 中)
ctrl + k + c, ctrl + k + u
Will comment / uncomment, respectively
分别会评论/取消评论
回答by Matthew Layton
Not in VB.NET, you have to select all lines at then Edit, Advanced, Comment Selection menu, or a keyboard shortcut for that menu.
不是在 VB.NET 中,您必须在“编辑”、“高级”、“注释选择”菜单或该菜单的键盘快捷键中选择所有行。
http://bytes.com/topic/visual-basic-net/answers/376760-how-block-comment
http://bytes.com/topic/visual-basic-net/answers/376760-how-block-comment
回答by Matthew Layton
In Visual Studio .NET you can do Ctrl+ Kthen Cto comment, Crtl+ Kthen Uto uncomment a block.
在 Visual Studio .NET 中,您可以执行Ctrl+ KthenC注释,然后Crtl+ KthenU取消注释块。