Visual Studio keyboard short-cut to complete default accessors {get; set;}
The shortcut is the trigger "prop":
prop
tabtabint
tabId
tab
and you end up with:
public int Id { get; set; }
Try with propfull
, then TAB Twice and you'll get:
private int myVar;
public int MyProperty
{
get { return myVar;}
set { myVar = value;}
}
You could also create a custom snippet:
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>GetSet</Title>
<Description>Inserts getter/setter shorthand code</Description>
<Shortcut>gs</Shortcut>
</Header>
<Snippet>
<Code Language="CSharp">
<![CDATA[{ get; set; }$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>