0

My auto format rules are set to add a space before and after parens in method calls, but they do not apply if the method call is in the same line as a declaration.

I've gone through the formatting settings for my language and turned on spacing options.

This auto formats the spacing in the method call:

bool example = true;
string myString;
myString = GetMyString( example );

But this does not:

bool example = true;
string myString = GetMyString( example);

1 Answer 1

0

Please try the following options to add a space before and after parens in method calls.

Tools->Options->C#->Code Style->Formatting-Spacing

Checked Insert space within argument list parentheses

enter image description here

1
  • Yes, I have that setting on. It works except when the method call is in the same line as a declaration. Commented Apr 8 at 17:03

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.