Ear*_*rlz 19 c# resharper autoformatting visual-studio visual-studio-2012
我安装Resharper主要是默认设置.目前,我希望我的多行lambda表达式看起来像这样:
foobarclass.biz.baz.Event += (s, e) =>
{
foo.Bar.DoThings.Whatever();
};
Run Code Online (Sandbox Code Playgroud)
但是,Resharper"帮助"将重新格式化我的代码如下:
foobarclass.biz.baz.Event += (s, e) =>
{
foo.Bar.DoThings.Whatever();
};
Run Code Online (Sandbox Code Playgroud)
在某些情况下,也会分解长语句,因此最终看起来像这样:
foobarclass.biz.baz.Event += (s, e) =>
{
foo.
Bar.
DoThings.
Whatever();
};
Run Code Online (Sandbox Code Playgroud)
正如您所知,这种自动格式化使代码的可读性降低了很多.我该如何解决这种行为?
Lev*_*lho 22
尝试取消选中:
RESHARPER - >选项 - > C# - >格式化样式 - >其他 - >缩进匿名方法体
| 归档时间: |
|
| 查看次数: |
2099 次 |
| 最近记录: |