Using Code Definition Window with Call Hierarchy in Visual Studio 2010

In my previous Tip I have discussed about Navigate Code Using Code Definition Window in Visual Studio .  In this tip I am just going to extend the same using  Call Hierarchy window. Call Hierarchy option in Visual Studio 2010 helps you to navigate through your code by displaying all calls to and from a selected  method or property. This represents a visualize version of Calling Methods or call from a method. Code Definition Window works nicely with Call Hierarchy.

To launch the Call Hierarchy window, right click on the methods or properties and select “View Call Hierarchy”

image

On selection of “View Call Hierarchy”  from context menu, Visual Studio will launch “View Call Hierarchy” Window with the Call To and Call From and Overrides details of the selected method or properties.

image

Now, pull the “Code Definition Window” as discussed in my last tip and check out the navigation while selecting any methods or properties with in Call Hierarchy window.

image

Yes. you really don’t need to move around the file. Code Definition window will display the code block corresponding to the selected methods in Call Hierarchy window.

To know more about Call Hierarchy Please Read this post and for “Code Definition View Click here

Hope this helps !

Cheers !

Abhijit

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.