Showing the Hierarchy of Method Calls

Visual Studio 2015 offers a window named Call Hierarchy. As its name implies, Call Hierarchy enables you to see the hierarchy of calls to one or more methods. To understand how it works, consider the following code:

Module Module1  Sub Main()    DoSomething()  End Sub  Sub DoSomething()    DoSomethingElse()  End Sub  Sub DoSomethingElse()    DoNothing()  End Sub  Sub DoNothing()    '   End SubEnd Module

This code defines some method, without performing any particular tasks, but it demonstrates a nested hierarchy of method calls. If you right-click the name of one of the methods and then select View Call Hierarchy from the context menu, you can see the method call hierarchy, as shown in Figure 2.40.

Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.