更新:2007 年 11 月
指定 IntelliSense 代码段使用的导入命名空间。
<Import>
    <Namespace>... </Namespace>
</Import>
属性和元素
以下几节描述了属性、子元素和父元素。
属性
无。
子元素
| 元素 | 说明 | 
|---|---|
| 必需的元素。 指定代码段使用的命名空间。Import 元素中必须有且仅有一个 Namespace 元素。 | 
父元素
| 元素 | 说明 | 
|---|---|
| 对 Import 的元素进行分组。 | 
备注
Imports 元素仅在 Visual Basic 项目中受支持。
示例
下面的示例演示导入命名空间 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>