Visual Studio - show all calls to a function in source code level

12,394

Solution 1

Right-click on the call and select "Find All References".

Solution 2

A brute force method is to change the name of the function and recompile and look at the errors. Sometimes I have trouble with the Find References functionality in VS.

Solution 3

On method declaration: Ctrl+K, Ctrl+T

Solution 4

Use NDepend. It comes with a VS add-in that allows you to do CQL queries on the fly. See this screenshot.

Share:
12,394
Admin
Author by

Admin

Updated on June 21, 2022

Comments

  • Admin
    Admin about 2 years

    I am wondering if there is any way to list all the calls to a function in source code, so that I could see the dependencies if I modify that function.

    One method I use is to search the function name in the "Entire Solution" but I am looking for a better way.