[英]vb.net Xmldocument, selectSingleNode only returns value with vs2008 “watch” utility
[英]Is it possible to override the auto-indentation of comments in VB.NET/VS2008?
是否可以在VB.NET中覆盖注释的自动缩进(使用Visual Studio 2008)?
有关上下文,请参见下面代码中第二个Case Statement上方的注释。
IDE会自动缩进注释,而不是下面的案例声明。 我想重写此行为,并使其与随后的Case中的C一致。
Select Case E.Type
'General Events
Case EventType.General_StartServer
'Initialize the Server Brain (ME)
GLOBAL__I_AM_THE_SERVER = True
Init()
'Server Alerts
Case EventType.ServerAlert_Chat
EventManager.SendEventToAllClients(New GameEvent(EventType.ClientAlert_Chat, 0, 0, 0, E.Str))
End Select
虽然您可以完全关闭重新格式化,但我敢打赌,这不是您想到的解决方案。
就个人而言,在给定的代码中,我将与案例有关的评论放在其下方。
Select Case E.Type
Case EventType.General_StartServer
' The server has started, so we need to do blah.
Case EventType.ServerAlert_Chat
' A chat has sent a server alert, so do blah.
End Select
我认为您正在菜单中寻找这个:
工具->选项->文本编辑器->基本-> VB特定->代码的漂亮列表(重新格式化)
从MSDN :
漂亮的代码清单(重新格式化)
文本编辑器将适当地重新格式化您的代码。 选择此选项后,代码编辑器将:
- 将代码对齐到正确的标签位置
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.