Visual Studio有一个工具栏按钮/键盘快捷键/菜单项,comments out selected lines of C# code使用//
。快速评论/ *在Visual Studio中选择C#代码* /(不是//整行)
是否有相当于仅仅是选定的代码使用/* ... */
?
例如
鉴于此代码
string s = "hello";
Console.WriteLine(s + " world");
如果选择+ "world"
,打按Ctrl + ķ,按Ctrl + Ç然后你
string s = "hello";
//Console.WriteLine(s + " world");
结束了。然而,我想要
string s = "hello";
Console.WriteLine(s /*+ " world"*/);
这对于我在对现有代码库进行一些实验性和临时性修改时修复一些错误很有用。
我认为这是为了告诉你/ * * /是EV1L! (它不是) – jv42
万岁/ * */ – kenny