Prevent addition of parens when tab-completing method group

40 Views Asked by At

I'm currently using Resharper 9.0 and if I've got code like the following:

public void DoSomething(Func<string, int> func);

public int SomeMethod(string input);

DoSomething(SomeMethod);

If I start typing the SomeMethod method group in the DoSomething call, and hit tab to complete the symbol, Resharper introduces unnecessary parentheses:

DoSomething(SomeMethod());

Which of course is a compile-error because SomeMethod takes an argument.

I've had a look around online and a hunt in Resharper's settings, but I can't seem to find a way to prevent this.

1

There are 1 best solutions below

0
On

I've just tested this scenario with 9.1.1 and I can't recreate it. Perhaps try updating (9.1.1 is a free upgrade to 9.0)?