'How to change the a default code snippet in Visual Studio 2017?

Given this code snippet, how can I change the default code provided in this snippet, in Visual Studio 2017?

enter image description here



Solution 1:[1]

Visual Studio 2010 -> Tools -> Code Snippet Manager

Change if needed the programming language and look ah the path of the snippet files. Close and create in VS17 a new xml file for a new snippet file. Save this as a Codesnippetfile with "Save File as" . enter image description here Go to the Folder of the existing snippetfiles and copy the needed part.

   <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
                <Title>  </Title>
                <Description>  </Description>
                <Author>  </Author>
                <Shortcut>  </Shortcut>
                <SnippetTypes>
                        <SnippetType>   </SnippetType>
                </SnippetTypes>
        </Header>
        <Snippet>
            <Code Language="   ">

            </Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>

Fill the rest and save the codesnippet file. Go back to the Code Snippet Manager and import your new custom file snippet file. Otherwise you can edit a existing snippet file and change on this way the automatic insertet code.

For detailed instructions. https://www.telerik.com/blogs/visual-studio-tip-creating-your-own-code-snippets

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Lord_Curdin