c# - Resharper 在 if 语句旁边移动顶部大括号。怎么上新线?

标签 c# visual-studio-2010 editor resharper resharper-8.0

我的 Resharper 8 在结束括号上自动格式化。顶部大括号移动到 IF 语句行的末尾。我怎样才能让它格式化到下一行。

开始声明

if (condition)
{
    var x = new foo();
}

当底部大括号被移除并重新键入时,这就是结果。顶部大括号移动到上面一行的末尾。

if (condition) {
    var x = new foo();
}

期望的结果是最初的开始语句。

如何更改 R#8 中的选项来解决这个问题?我尝试更改 C#/Formatting/Braces layout 选项中的选项。 enter image description here

最佳答案

我找到了。在格式样式 --> 换行和换行 --> 保留现有格式下,将“使用单个语句在 block 中换行”更改为“换行”。 this is where in resharper you change it

关于c# - Resharper 在 if 语句旁边移动顶部大括号。怎么上新线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20083452/

相关文章:

Emacs "M-x term"提示

firefox-addon - 如何从 Firefox 插件打开外部应用程序? (例如 : default text editor)

c# - asp.net 页面上的预设格式。

visual-studio - Visual Studio 指南 : Whats the right way since its 'outdated' ?

c# - 在发布版本中获取 System.Diagnostics.Debug.Assert() 的行为?

c# - Nancy 和/或 TinyIoC 不尊重 AsSingleton()

C#:水平翻转图像

java - Intellij-idea 反向粘贴到字符串中(也就是从字符串中复制)?

c# - EF6 : Configure complex mapping for entities (code first)

c# - 更新记录 Nhibernate 和 Iqueryable