How do I prevent Resharper from inserting a space after the colon of a named parameter?

Currently, Resharper will automatically insert a space after the colon in a named parameter, like so...

Foo(bar: true);

However, I would prefer that Resharper leave out the space between the parameter name and its value, like this...

Foo(bar:true);

But I can't find an option to do this in Resharper's code formatting settings. How do I make Resharper format this code to my preferred style?

Thanks for your help!!

0
2 comments

Hello Walt!

Thank you for contacting us.

Please try unchecking ReSharper | Options | Code Editing | C# | Formatting Style | Spaces | Other | After colon in attribute.

0

Thank you, this works for me. Ideally it would be a separate setting with a more obvious name, but this works for my particular purposes.

0

Please sign in to leave a comment.