Generate Method Stub

You can get Visual Studio to automatically generate a method stub for you. This is not strictly a refactoring operation but can provide some similar increases in productivity. The scenario where this is applicable is as follows. Suppose you are writing code that calls a method from one of your objects. However, that method does not yet exist. You can still write code to make the call to the nonexistent method. Visual Studio then recognizes that this method does not exist and provides you an option from the light bulb menu (see Figure 9.19) to create the method.

Image

FIGURE 9.19 Generate a method stub for a nonexistent method. ...

Get Microsoft Visual Studio 2015 Unleashed, Third Edition 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.