Search code examples
resharperresharper-2017

ReSharper Formatting - put method closing parenthesis on new line


When I declare or call a C# method with multi-line parameters like this:

public void DoSomething(
    p1,
    p2,
    p3);

Then I would like ReSharper to format that code to like this:

public void DoSomething(
    p1,
    p2,
    p3
);

Is there a setting that enables this behavior?


Solution

  • This feature is only available beginning with ReSharper 2018.1.

    Those settings are located here:

    Code Editing -> C# -> Formatting Style -> Line Breaks and Wrapping

    1. -> Arrangement of Method Signatures -> Prefer wrap before ")" in declaration
    2. -> Arrangement of Invocations -> Prefer wrap before ")" in invocation