Mahmoud ElMansy: knowledge meant to be free

Visual C# Code Snippets vs2012

This is the my first post on C# Code Snippet.
Code Snippets is a very handy feature inside Visual Studio there is of course defulat code snippets like,
“try,for,foreach,do,enum” i found them very helpful.

The cool thing is that you can create your Owen Snippet.
First : where to found visual studio snippet
“%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC#\Snippets\1033\Visual C#”

Second :  to manage Snippet inside visual studio you can do that from “Code Snippet Manager”

CodeSnippetManager

CodeSnippetManagerScreen

Now i will create my first Snippet for JQuery







Expansion

JQuery
ELMansy




JQready









I will illustrate the XML
part 1) SnippetType :

 SurroundsWith/Expansion

How visual studio will write the snippet.
Part 2) Shortcut :

JQready

The shortcut to write to bring the snippet.

Part 3) Code Language=”” :


Here it is “javascript”.

Part 4) you code :