2

我目前正在使用 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 的设置中进行了搜索,但我似乎找不到阻止这种情况的方法。

4

1 回答 1

0

我刚刚用 9.1.1 测试了这个场景,但我无法重新创建它。也许尝试更新(9.1.1 是免费升级到 9.0)?

于 2015-05-28T08:20:18.107 回答