Access your Code Snippets Manger by menu Tools / Code Snippets Manger.
Select Language and choose one code snippet to see. Example for this
Location:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC#\Snippets\1033\Visual C#\for.snippet
Description
Code snippet for 'for' loop
Shortcut
for
SnippetTypes
Expansion, SurroundsWith
Author
Microsoft Corporation
To use this, you type for and press twice Tab right after "for" (no space), Boom! A magic just happens!
for (int i = 0; i < length; i++)
{
}
Try it yourself and enjoy!
Update
Here is snippet for generating get set after name of properties. Save it as *.snippet and import to your VS.
<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>
Happy coding!
0 comments :
Post a Comment