Visual Studio keyboard short-cut to complete default accessors {get; set;}

Zamboni picture Zamboni · May 29, 2010 · Viewed 33.1k times · Source

I am looking for a keyboard short-cut to complete creating the default accessors for a property in a C# class.

Something like...
I start typing:

public int Id 

Then I press one or more keys, and I endup with:

public int Id { get; set; }

Answer

x0n picture x0n · May 29, 2010

The shortcut is the trigger "prop":

proptabtabinttabIdtab

and you end up with:

public int Id { get; set; }