在Visual Studio中将多行代码格式化为单行

在Visual Studio中将多行代码格式化为单行

问题描述:

在Visual Studio 2013中,是否存在键盘快捷键或快速方法将以下代码更改为一行?我还安装了Resharper.

Is there a keyboard shortcut or fast way to change the below code to a single line in Visual Studio 2013? I also have Resharper installed.

new XElement("Option",
            new XAttribute("Name", "FileDelete"),
            "1"
        ),

new XElement("Option", new XAttribute("Name", "FileDelete"),"1" ),

只需选择所有文本

,然后按(control + j)

它将变成1行代码