Assembly 요소(IntelliSense 코드 조각)

코드 조각이 참조하는 어셈블리의 이름을 지정합니다.

<Assembly>
    AssemblyName
</Assembly>

특성 및 요소

다음 단원에서는 특성, 자식 요소 및 부모 요소에 대해 설명합니다.

특성

없음

자식 요소

없음

부모 요소

요소

설명

참고 항목

코드 조각에서 필요로 하는 어셈블리 참조에 대한 정보가 포함되어 있습니다.

텍스트 값

텍스트 값이 필요합니다.

이 텍스트는 코드 조각이 참조하는 어셈블리를 지정합니다.

설명

Assembly 요소는 Visual Basic 코드 조각에서만 지원됩니다.

Assembly 요소의 텍스트 값은 어셈블리의 텍스트 이름(예: System.dll)이거나 강력한 이름(예: System,Version=1.0.0.1,Culture=neutral,PublicKeyToken=9b35aa323c18d4fb1)입니다.

예제

다음 코드 조각은 System.Data.dll 어셈블리를 참조합니다. 코드 조각이 삽입되면 이 참조가 프로젝트에 추가됩니다.

<CodeSnippets xmlns="https://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
            <Title>Create a data adapter</Title>
            <Description>Creates a SqlDataAdapter object.</Description>
            <Author>Microsoft Corporation</Author>
            <Shortcut>createadapter</Shortcut>
        </Header>
        <Snippet>
            <References>
                <Reference>
                    <Assembly>System.Data.dll</Assembly>
                    <Url>https://www.microsoft.com</Url>
                </Reference>
            </References>
            <Imports>
                <Import>
                    <Namespace>System.Data</Namespace>
                </Import>
            </Imports>
            <Declarations>
                <Literal>
                    <ID>SQL</ID>
                    <ToolTip>Replace with a SQL connection string.</ToolTip>
                    <Default>"SQL connection string"</Default>
                </Literal>
                <Object>
                    <ID>Connection</ID>
                    <Type>System.Data.SqlClient.SqlConnection</Type>
                    <ToolTip>Replace with a connection object in your application.</ToolTip>
                    <Default>dcConnection</Default>
                </Object>
            </Declarations>
            <Code Language="VB">
                <![CDATA[
                    daCustomers = new SqlClient.SqlDataAdapter();
                    selectCommand = new SqlClient.SqlCommand($SQL$);
                    daCustomers.SelectCommand = selectCommand;
                    daCustomers.SelectCommand.Connection = $Connection$;
                ]]>
            </Code>
        </Snippet>
    </CodeSnippet>
</CodeSnippets>

참고 항목

개념

코드 조각 스키마 참조