Lazlo
Lazlo

Reputation: 8790

Resharper: Put opening parenthesis on new line

I've seen questions and answers about aligning closing parentheses with ReSharper, but in my case, I'd like to force the opening parenthesis to be on a new line.

For example:

Method(
    param1,
    param2
);

Would become:

Method
(
    param1,
    param2
);

I'm aware this style is unconventional, but because I'm working with CodeDOM, I'm creating a lot of tree-like constructs through method calls, so treating parentheses like curly braces would make the structure much more readable.

Upvotes: 0

Views: 162

Answers (1)

Lazlo
Lazlo

Reputation: 8790

Found it right after posting...

Enabling all three checkboxes here does what I want:

  • C# > Line Breaks and Wrapping > Arrangement of Invocations
    • Prefer wrap before "(" in invocation
    • Prefer wrap after "(" in invocation
    • Prefer wrap before ")" in invocation

Upvotes: 1

Related Questions