Namespace Element (IntelliSense Code Snippets)
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. ArchiveDisclaimer

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="">
    <CodeSnippet Format="1.0.0">
            <!-- Insert Header information here. -->
                <!-- Insert literal and object declarations here. -->
            <Code Language="VB">
                <!-- Insert code here. -->
© 2015 Microsoft