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

Import Element (IntelliSense Code Snippets)

Specifies the imported namespaces used by an IntelliSense Code Snippet.


  
    
      
        
<Import>
    <Namespace>... </Namespace>
</Import>

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

Attributes

None.

Child Elements

Element

Description

Namespace

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

Imports

Grouping element for Import elements.

The Imports element is only supported for Visual Basic projects.

The following example shows a code snippet that imports the namespace System.Data.

<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>
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.