Chapter 6: Debugging with Visual Studio | 149 |
Figure 6-1 The Call Hierarchy window
From the perspective of reuse, many call sites to a method could indicate that the method is relatively generic and reusable. While a low number of call sites might not indicate the reusability of a method, zero call sites certainly indicates that the method is not being used and can potentially be eliminated.
A lot of call sites could also indicate that a change to a method can have a significant impact. Looking at the number of call sites that a method has could be informative from the perspective of passing different values or seeing how many changes will be required in called methods.
The previous discussion is to help you understand how call hierarchy might be useful. Now, let’s look at how call hierarchy works. First, remember that call hierarchy is
The Call Hierarchy window in Figure
The