Visual Studio keyboard short-cut to complete default accessors {get; set;}
问题 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; } 回答1: The shortcut is the trigger "prop": prop tab tab int tab Id tab and you end up with: public int Id { get; set; } 回答2: Try with propfull , then TAB Twice and you'll get: private int myVar; public int MyProperty { get { return myVar;} set { myVar = value;} }