Did C# formatting change in Visual Studio 2015? And how can I change it back?

后端 未结 2 1941
南旧
南旧 2020-12-08 13:05

In past versions of Visual Studio, I could create a single-line autoproperty in C# like this:

public int Whatever { get; set; }

If I hit Co

2条回答
  •  臣服心动
    2020-12-08 13:42

    Go to Tools > Options > Text editor > C# > Formatting > Wrapping

    Check "Leave block on single line" and "Leave statements and member declarations on the same line"

    enter image description here

提交回复
热议问题