Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道是否有任何方法可以在源代码中列出对函数的所有调用,以便在修改该函数时可以看到依赖关系。
我使用的一种方法是在“整个解决方案”中搜索函数名称,但我正在寻找更好的方法。
右键单击该调用并选择“查找所有引用”。
蛮力方法是更改函数名称并重新编译并查看错误。有时我在使用 VS 中的查找引用功能时遇到问题。
在方法声明上: Ctrl+ K, Ctrl+T
使用NDepend。它带有一个 VS 插件,可让您即时执行 CQL 查询。请参阅此屏幕截图。