與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