Hints And Tips research knowledge archive
Tip# 507
Sponsored Links
 
Subject: Visual Studio Snippets the easy way, tip!
Updated: Nov-15-2007
Rating: Not Rated
By: Rocky Moore - Member #: 1
Location: Klamath Falls, Oregon USA
Website: www.RockyMoore.com
Category: Computers > Programming > .NET
Rate This Tip (10=Great):  1  2  3  4  5  6  7  8  9  10
I have used Visual Studio for some time.  The Snippet feature was really handy in generating code you normally have to type in all the time.  For years now, I press the CTRL+K,CTRL+X keys to get the list of snippets and then navigate down to the snippet I want to use.

While this has been useful, it always seemed to me that snippets seemed to take a bunch of effort just to access them.  Well...  I just found out today, you only need to type their name and hit the TAB key twice to generate the snippet.  Wow!  That is really simple.  For example, just type "prop" in the editor and hit the TAB key twice, that should generate the puplic property code with a get and set.  Or just enter "foreach" and hit TAB twice..  Or maybe "#region" and tab twice..  Just TOO cool!

I guess I should have read the documentation to snippets, but I figured it all looked simple enough.  Maybe there are a few of you out there that have missed this big feature!

Another stupid oversight on my part, the snippets are listed in intellisense and when you type part of one it appears, you can just hit TAB twice to generate it.

While posting this, I might add just in case you do not know about it, there is a Snippet manager built in under the "tools" menu.  

Also, if you want more information on them, try on MSDN at "Creating and uing IntelliSense Code Snippets":

http://msdn2.microsoft.com/en-us/library/ms165392(VS.80).aspx

Lots of good information there!

[Submit DIGG for this tip]


-----------
Note: Use the tips posted on this site at your own risk. The tips are posted by the public and as such may or may not be valid.

Sponsored Links
Sponsor Sites To Visit
The Awakening
Spirit-Filled Christianity is
more than filling a pew !

Not producing fruit?
Healing, where to turn?
Provision, where to turn?
Lost, where to turn?

It is time for --TheAwakening !
The Saints In Light
Christian Thoughts on
Various Topics - Check it Out!

Click Here
Silverlight City

Keep up with the latest in
Microsoft's Silverlight
Technology!

Click Here
Our Local Christians
Find other Christians
In your local area
Who share your beliefs!

Click Here
United Christian Voters
Tired of seeing your
Rights Vanish?
If all Christians would
Pull together, we can
bring Change Unite Now!

Click Here
Reflected Thought
Inventions ~ Ideas ~ Humor
Politics ~ Opinions ~ Thoughts
Software Development
Business And Stuff....

Click Here
XML RSS News Feed For Recently Posted Hints And Tips  RSS Feed
You can now get updates to the Recent Tips section by using RSS. The address is:

HintsAndTips.com/Rss.aspx

* Posting Tips *
To post a Tip, Recommendation or Tips Wanted, simply browse to the category you feel is a best fit for your post (click on the Recommention or Tips Wanted tab if fitting) and then click on "New Post" option.
(C) Copyright 1998-2008 All Rights Reserved By R & J Technologies - www.RJSoft.com