与Visual Studio调用层次结构功能我可以找到调用某个方法。Visual Studio调用层次结构:如何通过实现的接口找到调用方法?
但是,它似乎无法通过实现的接口找到类。如下所示,如果通过IFoo调用Method()
,则在调用层次结构中找不到这些调用?
interface IFoo
{
void Method();
}
class Foo : IFoo
{
public void Method()
{
// ...
}
}
有没有办法在普通的VS或一些免费的插件做到这一点?
Resharper似乎可以在C# - Can't find usage of method when inherited and used through an interface implemented by the subclass中做到这一点(在更复杂的情况下有一些问题)。
BR,Touko
在提供的代码中,类没有*实现*接口。这是一个错误吗? – Tigran 2012-03-30 07:02:10
非常好的一点,固定=) – Touko 2012-03-30 07:43:52