Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Imports Element (IntelliSense Code Snippets)

Groups individual Import elements.

<CodeSnippets>
   <CodeSnippet>
     <Snippet>
       <Imports>
<Imports>
    <Import>... </Import>
<Imports>

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

Attributes

None.

Child Elements

Element

Description

Import

Optional element.

Contains the imported namespaces for the code snippet. There may be zero or more Import elements in an Imports element.

Parent Elements

Element

Description

Snippet

Contains the references, imports, declarations, and code for the code snippet.

The Imports element is only supported for Visual Basic projects.

The following example shows a code snippet that requires the namespaces System.Data and System.Xml to be imported.

<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>
                <Import>
                    <Namespace>System.Xml</Namespace>
                </Import>
            </Imports>
            <Declarations>
                <!-- Insert literal and object declarations here. -->
            </Declarations>
            <Code Language="VB">
                <!-- Insert code here. -->
            </Code>
        </Snippet>
    </CodeSnippet>
</CodeSnippets>

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.