1

In Visual Studio, when I right-click I've the option to Insert Snippet. Are those snippets static or I can add my own snippets? How can this be done?

4 Answers 4

3

You can add your own.

There is a whole section on snippets on MSDN, you may want to start by reading all the articles in the Creating Code Snippets page.

Sign up to request clarification or add additional context in comments.

Comments

1

menu Tools -> Code Snippets Manager should help

Comments

1

This is also a very nice tool to write them

1 Comment

It seems very useful. I've installed-it and I'll try to learn to use it. Thanks.
1

A direct way of editing and creating snippets is to work with the *.snippet files in the snippets folder.

On Windows 7 this directory would be:

"C:\Users\your_user\Documents\Visual Studio 2010\Code Snippets"

You could create a snippet for C# and place it in this directory:

"C:\Users\your_user\Documents\Visual Studio 2010\Code Snippets\Visual C#\My Code Snippets"

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.