Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Specifies the imported namespaces used by an IntelliSense Code Snippet.
<CodeSnippets>
<CodeSnippet>
<Snippet>
<Imports>
<Import>
<Import>
<Namespace>... </Namespace>
</Import>
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
Attributes
None.
Child Elements
Element |
Description |
---|---|
Required element. Specifies the namespace used by the code snippet. There must be exactly one Namespace element in an Import element. |
Parent Elements
Element |
Description |
---|---|
Grouping element for Import elements. |
Remarks
The Imports element is only supported for Visual Basic projects.
Example
The following example shows a code snippet that imports the namespace System.Data.
<CodeSnippets xmlns="https://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>