我目前正在使用 Resharper 9.0,如果我有如下代码:
public void DoSomething(Func<string, int> func);
public int SomeMethod(string input);
DoSomething(SomeMethod);
如果我开始在调用中键入SomeMethod
方法组DoSomething
,然后按 tab 来完成符号,Resharper 会引入不必要的括号:
DoSomething(SomeMethod());
这当然是一个编译错误,因为SomeMethod
需要一个参数。
我在网上浏览了一遍,并在 Resharper 的设置中进行了搜索,但我似乎找不到阻止这种情况的方法。