Automatically create Getter Setter in Visual Studio

private string directory;

This is your member variable. Highlight and right click on ‘directory’, then choose Refactor/Encapsulate Field.

Produces the following code automatically:

public string Directory
{
get { return directory; }
set { directory = value; }
}

Advertisements

5 Responses to “Automatically create Getter Setter in Visual Studio”

  1. AnonimMex Says:

    Gracias, fue de ayuda tu post.

    Saludos…!

  2. Tu sitio de relax Says:

    Tu sitio de relax…

    […]Automatically create Getter Setter in Visual Studio « Bishop On Development[…]…

  3. york Says:

    Thank’s, this was realy helpfull

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s


%d bloggers like this: