How to: Delete a Snippet Added to Your Code

Adding an IntelliSense Code Snippet to your code is considered a single edit by the Code Editor.

To delete a snippet immediately after insertion

  • Type CTRL+Z or choose Undo from the Edit menu.

    You can "undo" an insertion in this way because the entire snippet is recognized as one unit by the Code Editor until the file has been closed.

To delete a snippet after it has been modified

  1. Select the lines of code in the snippet that you want to delete.

  2. Delete the lines using Cut from the Edit menu, CTRL+X, or DEL.

    If you delete a snippet after it has been modified, any imports or references added in association with the snippet will remain in your project.

See Also

Tasks

How to: Insert Snippets Into Your Code (Visual Basic)

Concepts

Visual Basic IntelliSense Code Snippets

Reference

Creating and Using IntelliSense Code Snippets