One of the new features of Visual Studio 2005 is the ability to use Code Snippets.
At times coding can be very repeative and the 9 out of 10 times its the same thing that I am typing. By using the snippets feature I can reduce this.
So How do you insert a Code Snippet?
The fastest way is from the keyboard Press the Ctrl key + K and then X.

A popup window will appear for you do select the available snippets. There are several to choose from and you can even create your own! For this tip I am going to do a Property snippet. Press ‘P’ on your keyboard or scroll through the list and select it.

Your code will now have the snippet template of the property item in place. Very cool! However the best is yet to come! Notice that the private data member type is highlighted.
Go ahead and change it to the type you need. I am going to change mine to a string.

To change the name of the private data member simply hit the tab key. Now the highlighted box is around the private data member name. Type in the name you would normally give your private data members.

One really nice feature is the set and get values have been modified automatically to the same name as the private data member.
Finally tab one more time and enter your property Name.

Once you like what you see hit the enter key. However if you want to change any of the values you made you can simply hit the tab key again and it cycle through them all. (You can’t do this after hit the enter key though)
To me this is one of my favorite features and I find myself constantly doing these key strokes when I am in Visual Studio 2003. One more reason to port everything over to .net 2.0!
