【问题标题】:Formatting properties on one line in VS2015 Community editionVS2015社区版中的一行格式化属性
【发布时间】:2015-09-26 12:50:29
【问题描述】:

如何在 VS2015 社区版中概述属性?默认设置是这样的:

public int Foo
{ get; set; }

但我会这样概述:

public int Foo { get; set; }

我查看了 vs 的设置,但是如果我取消选中“在单行上保留块”(见下图),结果是这样的:

public int Foo
{ 
    get; set; 
}

【问题讨论】:

    标签: visual-studio-2015 code-formatting word-wrap


    【解决方案1】:

    答案可以在here找到。

    转到工具 > 选项 > 文本编辑器 > C# > 格式化 > 换行

    勾选“Leave block on single line”和“Leave statements and member declarations” 在同一行”

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-07-16
      • 1970-01-01
      • 2011-07-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多