C# “prop” code snippet for getter/setter property auto generation

Within Visual Studio, Just type “prop” and hit tab twice and the following stub will be generated automatically generate a property.

 public int MyProperty { get; set; }

You can find the entire list of snippets here:

In Visual Studio 2005,
C:\Program Files\Microsoft Visual Studio 8\VC#\Snippets\1033\Visual C#

In Visual Studio 2008,
C:\Program Files\Microsoft Visual Studio 9.0\VC#\Snippets\1033\Visual C#

In Visual Studio 2010,
C:\Program Files\Microsoft Visual Studio 10.0\VC#\Snippets\1033\Visual C#


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