本文介绍了在 VisualStudio 中查找对重写方法的所有引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个接口 ISomething,它定义了 GetSomething().

I have an interface ISomething which defines GetSomething().

我有一堆类Something1Something2,...都实现了ISomething,因此GetSomething()代码>.

I have a bunch of classes Something1, Something2,... all implement ISomething and therefore GetSomething().

当我右键单击 Something1.GetSomething() 并单击 Find All References 时,VisualStudio 会显示对 ISomething.GetSomething() 而不是实际的派生类.

When I right-click on Something1.GetSomething() and click Find All References, VisualStudio shows all references to ISomething.GetSomething() instead of the actual derived class.

我想知道是否有一种方法可以导航到 Something1.GetSomething() 而无需向下滚动 GetSomething()

I'm wondering if there is a way to navigate to Something1.GetSomething() without scrolling down all the implementations of GetSomething()

推荐答案

Find All References 旁边是 View Call Hierarchy.它将对所选成员的引用分解为 3 组:Calls To、Calls From 和Implements.您可能正在寻找最后一个.

Right next to Find All References is View Call Hierarchy. It breaks up references to the selected member into 3 groups: Calls To, Calls From, and Implements. You're probably looking for the last one.

这篇关于在 VisualStudio 中查找对重写方法的所有引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 13:52