Unheard wish fulfilled
Jeff Key
Friday, March 26, 2004
Comments

Man oh man I can't wait to dig further into VS 2005 TP.  I only had a minute before work to very quickly check out a few things and noticed “Generate Method Stub” in the Refactoring menu.  Going on a hunch, I created an event handler for a dummy button on a form:

private void button3_Click(object sender, EventArgs e)
{
     string something = HelloMethod(sender);
}

HelloMethod didn't exist.  I put the cursor on the HelloMethod and selected Refactoring|Generate Method Stub and got the following:

private string HelloMethod(object sender)
{
    throw new NotImplementedException();
}

Are you kidding me?!?  Brilliant! 

  • It inferred the proper return type.
  • Properly named and typed the param.
  • Private visibility.
  • NotImplementedException by default.

I need this feature several times a day and I couldn't ask for a better implementation.  Thank you!


You might also be interested in my .NET development tools, samples, etc. (All free, of course!)