The code snippet consists of two main parts:
The Header has the following sections:
- Title
- Shortcut
- Description
- Author
- SnippetTypes
The Header is the code snippets meta-data which includes
the title of the code snippet, a shortcut to access the code snippet, a description
explaining what the code snippet does, and other relevant information.
The Snippet has a mandatory section and an optional one:
The required section is the Code section. In this section
you define the code emitted by the code snippet. The optional Declarations
section is used to define the replaceable values in the code snippet.
Replicable values are represented by $value$ in the Code section; they are
displayed as green and are configurable by the developer using the code
snippet.
Code snippets are language-specific. Visual Studio 2005
ships with a number of ready code snippets for both Visual Basic and C#. You
can find all the code snippet files at the following path:
{Drive Letter}:\Program
Files\Microsoft Visual Studio 8\VC#\Snippets\1033\Visual C#