次の方法で共有


Description 要素 (IntelliSense コード スニペット)

更新 : 2007 年 11 月

IntelliSense コード スニペットの内容に関する説明文を指定します。

<Description>
    Code Snippet Description
</Description>

属性と要素

以降のセクションでは、属性、子要素、および親要素について説明します。

属性

なし。

子要素

なし。

親要素

要素

説明

Header

コード スニペットに関する全般的な情報が格納されます。

テキスト値

テキスト値が必要です。

このテキストで、コード スニペットの説明を指定します。

解説

Description 要素に指定されたテキスト値は、コード スニペット ピッカーではコード スニペットのツールヒントとして、また、コード スニペット マネージャではコード スニペットの説明として使用されます。

使用例

次のコード スニペットの Description 要素には、Copies a file and saves it as another file という値が格納されています。この説明文が、コード スニペット挿入機能ではコード スニペットのツールヒントとして、また、コード スニペット マネージャではコード スニペットの説明として表示されます。

<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>

参照

概念

コード スニペット スキーマ リファレンス