【问题标题】:JetBrains Resharper Line break when doing silent code cleanupJetBrains Resharper 进行静默代码清理时换行
【发布时间】:2016-05-20 03:22:07
【问题描述】:

每当我执行静默清理时,我的方法格式如下:

public void MyMethod(
     IEnumerable<IPaymentMethod> paymentMethods,
     IPaymentMethod expected,
     bool isDirectBill) {

我希望它的格式如下:

public void MyMethod(
     IEnumerable<IPaymentMethod> paymentMethods,
     IPaymentMethod expected,
     bool isDirectBill) 
{

我一辈子都找不到这个设置

【问题讨论】:

    标签: c# resharper jetbrains-ide


    【解决方案1】:
    1. 转到 ReSharper Options -&gt; Code Editing -&gt; Code Cleanup。检查用于静默清理的配置文件(在底部)并确保为此配置文件选中 Reformat Code 选项。

    2. 然后转到Code Editing -&gt; C# -&gt; Formatting Style -&gt; Braces Layout 并检查方法声明的首选项。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-09-26
      • 2012-05-21
      • 1970-01-01
      • 2011-06-01
      • 2017-07-08
      • 2011-03-04
      • 2013-05-08
      相关资源
      最近更新 更多