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...


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!!


Hello Walt!

Thank you for contacting us.

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


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.


Please sign in to leave a comment.