块注释 VB/VB.NET 代码 [英] Block commenting VB/VB.NET code

查看:33
本文介绍了块注释 VB/VB.NET 代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 VB 中注释多行代码/代码块?

解决方案

VB 在语言级别没有这样的结构.它有使用撇号字符的单行注释:

' hello world'这是一条评论雷姆这也是评论

但是,Visual Studio 具有自动执行此任务的功能.选择您想要的行,然后按 Ctrl+K+C 进行评论,然后按 Ctrl+K+U 用于取消注释(通用开发设置快捷方式,在选择一些代码的同时查看编辑 -> Advanced"菜单以查看快捷方式).>

How to comment multiple lines of code/block of code in VB?

解决方案

VB doesn't have such a construct at the language level. It has single line comments using apostrophe character:

' hello world
' this is a comment
Rem this is also a comment

However, Visual Studio has a functionality to automate this task. Select the lines you want and press Ctrl+K+C for commenting and Ctrl+K+U for uncommenting (General Development Settings shortcuts, look at the "Edit -> Advanced" menu while selecting some code to see the shortcuts).

这篇关于块注释 VB/VB.NET 代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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