Here I am trying to add a quick list of elementary functions that are quite often used. Few more I have on my cards are: 1. Random string generator based on a custom alphabet set. 2. Object compare using serialization etc etc You are free to come up with your suggestions, I will try to add them here when time permits. Meanwhile few things that shouldn't go in here are the standard algorithms, like Sorting algorithms, Shortest path etc as they are very freely available on the internet.

Monday, December 21, 2009

How to create code snippets using Visual studio

Here is how you could create a custom code snippet using the visual studio "snippet" for snippet creation.

1. Open Visual studio (2005 or 2008).
2. Go to File -> New File (Ctr + N) -> choose Xml file and click "Open".
3. Ctr + K, Ctr + S and choose "Snippet" from the snippet drop down. This creates the skeletal xml for snippet creation.
4. Work on this template


Few interesting tags to be noted are:
1. $selected$ - this tag represents the text selected in the IDE by the user, before invoking the snippet. You could add snippet code above and/or below this tag.

2. $end$ - denotes the location where the carret will go after snippet replacement.

Followers

About Me

My photo
Simple straight forward