Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Namespace Element (IntelliSense Code Snippets)

Specifies the namespace that must be imported for the code snippet to compile and run.


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



Child Elements


Parent Elements




Imports the specified namespace.

A text value is required.

This text specifies a namespace that the code snippet assumes is imported.

The Namespace element is only supported for Visual Basic projects.

The namespace specified in the Namespace element is automatically added to an Imports Statement (.NET Namespace and Type) statement at the beginning of the code, if it does not already exist.

The following code example imports the System.Data namespace.

<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
            <!-- Insert Header information here. -->
                <!-- Insert literal and object declarations here. -->
            <Code Language="VB">
                <!-- Insert code here. -->

Community Additions

© 2015 Microsoft