Visual Studio 2010 contains a very useful feature called ‘View Call Hierarchy’. This feature lets you dive into all the calls that are made ‘to’ a method, property or constructor as well as all the calls that are made ‘from’ that method, property or constructor. As given in the documentation “You can examine several levels of code to view complex chains of method calls and additional entry points to the code, which enables you to explore all possible execution paths”
For example, right clicking on the LogOff() method brings up the ‘View Call Hierarchy’ option in the context menu
Clicking on the ‘View Call Hierarchy’ option brings up the following window which displays the calls that are made to LogOff() as well as the calls that are made from LogOff().
Double clicking these calls takes you to the specific line of code where the call is made from or where the call is made to. Extremely handy!
Will you give this article a +1 ? Thanks in advance