【发布时间】:2012-08-19 18:59:39
【问题描述】:
Visual Studio 有一个工具栏按钮/键盘快捷方式/菜单项,comments out selected lines of C# code 使用 //。
是否有使用/* ... */ 输出所选代码的等价物?
例如
鉴于此代码
string s = "hello";
Console.WriteLine(s + " world");
如果您选择+ "world" 并按Ctrl+K、Ctrl+C,那么您将结束与
string s = "hello";
//Console.WriteLine(s + " world");
不过,我愿意
string s = "hello";
Console.WriteLine(s /*+ " world"*/);
当我在修复一些错误的同时对现有代码库进行一些实验性和临时性修改时,这将很有用。
【问题讨论】:
-
我想这是为了告诉你 /* */ 是 EV1L !!! (事实并非如此)
标签: c# visual-studio-2010 comments keyboard-shortcuts