Bagikan melalui


Description Element (IntelliSense Code Snippets)

Specifies descriptive information about the contents of an IntelliSense Code Snippet.

<CodeSnippets>
   <CodeSnippet>
     <Header>
       <Description>

<Description>
    Code Snippet Description
</Description>

Attributes and Elements

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

Attributes

None.

Child Elements

None.

Parent Elements

Element

Description

Header

Contains general information about a code snippet.

Text Value

A text value is required.

This text specifies a description of a code snippet.

Remarks

The text value of the Description element provides a ToolTip for the code snippet in the Code Snippet Picker and the description for the code snippet in the Code Snippets Manager.

Example

The Description element in the following code snippet contains the value Copies a file and saves it as another file. This description appears as the code snippet's ToolTip in the Code Snippet Inserter and the code snippet's description in the Code Snippet Manager.

<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