Udostępnij za pośrednictwem


Keywords Element (IntelliSense Code Snippets)

Groups individual Keyword elements.

<CodeSnippets>
   <CodeSnippet>
     <Header>
       <Keywords>

<Keywords>
    <Keyword>... </Keyword>
    <Keyword>... </Keyword>
<Keywords>

Attributes and Elements

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

Attributes

None.

Child Elements

Element

Description

Keyword

Optional element.

Contains individual keywords for the code snippet. There may be zero or more Keyword elements in a Keywords element.

Parent Elements

Element

Description

Header

Contains general information about the code snippet.

Remarks

The code snippet keywords are used by Visual Studio and represent a standard way for online content providers to add custom keywords for searching or categorization.

Example

The following code snippet contains the keywords File copying and Copying files.

<CodeSnippets xmlns="https://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
            <Title>Copy File</Title>
            <Author>Microsoft Corporation</Author>
            <Description>Copies a file and saves it as another file.</Description>
            <HelpUrl>www.microsoft.com</HelpUrl>
            <SnippetTypes>
                <SnippetType>Expansion</SnippetType>
            </SnippetTypes>
            <Keywords>
                 <Keyword>File copying</Keyword>
                 <Keyword>Copying files</Keyword>
            </Keywords>
            <Shortcut>copyfile</Shortcut>
        </Header>
        <Snippet>
            <!-- Insert snippet information here -->
        </Snippet>
    </CodeSnippet>
</CodeSnippets>

See Also

Concepts

Code Snippets Schema Reference