Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SnippetType Element (IntelliSense Code Snippets)

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




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="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <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 -->
© 2015 Microsoft