【发布时间】:2018-11-01 16:53:17
【问题描述】:
当我声明或调用具有多行参数的 C# 方法时:
public void DoSomething(
p1,
p2,
p3);
然后我希望 ReSharper 将该代码格式化为:
public void DoSomething(
p1,
p2,
p3
);
是否有启用此行为的设置?
【问题讨论】:
当我声明或调用具有多行参数的 C# 方法时:
public void DoSomething(
p1,
p2,
p3);
然后我希望 ReSharper 将该代码格式化为:
public void DoSomething(
p1,
p2,
p3
);
是否有启用此行为的设置?
【问题讨论】:
此功能仅以ReSharper 2018.1 开头。
这些设置位于此处:
Code Editing -> C# -> Formatting Style -> Line Breaks and Wrapping
-> Arrangement of Method Signatures -> Prefer wrap before ")" in declaration-> Arrangement of Invocations -> Prefer wrap before ")" in invocation【讨论】:
Prefer wrap before "(" in declaration,而不是右括号。我使用的是 2017.3 版本。