[英]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.