Namespace Element (IntelliSense Code Snippets)
Visual Studio 2010
Specifies the namespace that must be imported for the code snippet to compile and run.
<Namespace>
Namespace
</Namespace>
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">
<Header>
<!-- Insert Header information here. -->
</Header>
<Snippet>
<Imports>
<Import>
<Namespace>System.Data</Namespace>
</Import>
</Imports>
<Declarations>
<!-- Insert literal and object declarations here. -->
</Declarations>
<Code Language="VB">
<!-- Insert code here. -->
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>