次の方法で共有


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

コード スニペットのタイトルを指定します。

<Title>
    Code Snippet Title
<Title>

属性および要素

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

属性

なし。

子要素

なし。

親要素

要素

説明

ヘッダー

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

テキスト値

テキスト値が必要です。

このテキストでコード スニペットのタイトルを指定します。

解説

コード スニペットの Title の要素に格納されているタイトルは コード スニペット ピッカー と **[コード スニペット マネージャー]**のコード スニペットの説明として表示されます。

使用例

次のコード スニペットの Title 要素には、Copy 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>

参照

処理手順

チュートリアル: コード スニペットを作成する

概念

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