This documentation is archived and is not being maintained.

SnippetType Element (IntelliSense Code Snippets) 

Specifies how Visual Studio inserts the code snippet.


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



Child Elements


Parent Elements

Element Description


Groups SnippetType elements.

The text value must one of the folllowing values.

  • SurroundsWith: allows the code snippet to be placed around a selected piece of code.

  • Expansion: allows the code snippet to be inserted at the cursor.

  • Refactoring: specifies that the code snippet is used during Visual C# refactoring. Refactoring cannot be used in custom code snippets.

The SnippetType element of the following code snippet has the value Expansion. This indicates that the code snippet can be inserted at the cursor.

<CodeSnippets xmlns="">
    <CodeSnippet Format="1.0.0">
            <Title>Copy File</Title>
            <Author>Microsoft Corporation</Author>
            <Description>Copies a file and saves it as another file.</Description>
                 <Keyword>File copying</Keyword>
                 <Keyword>Copying files</Keyword>
            <!-- Insert snippet information here -->