"Generate Method Stub" rocks!

lately i have been playing around with VS.NET 2005 Beta 1 – and i must say : i love it. One day with the new IDE and you don’t want to go back in time to 2003 :)

While coding the new Crypter sample with the new X509 classes i experimented a little bit with the refactoring support. i especially liked “Generate Method Stub”. Never heard of “Intentional Programming” before – but this seems to be my way :)

Some examples:

static void Main(string[] args)
{
  string user = getUser();
}

Right Click on getUser() -> Generate Method Stub – and voila

private static string getUser()
{
  throw new NotImplementedException();
}

nice and static.

another one i liked:

Lib lib = new Lib();
string user = lib.GetUser();

click. VS now adds the GetUser Method to the referenced class. nice.

internal string GetUser()
{
  throw new NotImplementedException();
}

this one rocked my world:

public string[] AddUser(string UserName, string Password)
{
  // Add the User and return all Users
  return GetUsers();
}

click on GetUsers() and you get

private string[] GetUsers()
{
  throw new NotImplementedException();
}

nice work VS.NET Team!

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s