This documentation is archived and is not being maintained.

CodeSnippet Element (IntelliSense Code Snippets) 

Allows you to specify a heading and multiple IntelliSense Code Snippets, which you can insert into Visual Studio 2005 code files.

<CodeSnippet Format="x.x.x">
    <Header>... </Header>
    <Snippet>... </Snippet>

The following sections describe attributes, child elements, and parent elements.


Attribute Description


Required attribute.

Specifies the schema version of the code snippet. The Format attribute must be a string in the syntax of x.x.x, where each "x" represents a numerical value of the version number. Visual Studio will ignore code snippets with Format attributes that it does not understand.

Child Elements

Element Description


Required element.

Contains general information about the code snippet. There must be exactly one Header element in a code snippet.


Required element.

Contains the code that will be inserted by Visual Studio. There must be exactly one Snippet element in a code snippet.

Parent Elements

Element Description


Root element of the code snippet XML schema.

The following code shows a code snippet targeting version 1.0.0 of the code snippet XML schema.

<CodeSnippets xmlns="">
    <CodeSnippet Format="1.0.0">
            <!-- Insert header information here -->
            <!-- Insert snippet information here -->