VS.NET 2005 and Generate Method Stub

Matt Berther bio photo By Matt Berther Comment

Visual Studio.NET 2005 introduces several handy refactorings, including Extract Interface and Extract Method.

One item on the menu is Generate Method Stub. The idea is that you can type a method name and then right click, select refactor and Generate Method Stub, and it would provide a stubbed method for you (throwing a NotImplementedException).

Can anyone answer why this is on the Refactoring menu?

While this is a superb feature, I'm still trying to figure out how this is related to refactoring. To me, this seems more like a tool to assist in new coding, whereas refactoring improves the design of existing code.