Code Snippets

If you are a developer and use at least Visual Studio 2005, do you use code snippets? Handy little things that complete a chunk of code for you. For example, osInvoke (followed by tab-tab) give you this:

delegate

void InvokeDelegate();

public

void Begin_Invoke()
{
     textBox1.BeginInvoke(
new InvokeDelegate(InvokeMethod));
}

public

void InvokeMethod()
{
     textBox1.Text =
“Invoked”;
}
 

 

Handy!

Intellisense in VS is great. Ctrl-space is the shortcut that brings up the whole intelli-sense context menu. You can also type the name of the code snippet you want and intelli-sense will offer to complete it, then you can hit tab-tab.  Ctrl-K Ctrl-X gives you the snippet menu.

MSDN page for code snippets here. http://msdn.microsoft.com/en-us/library/z4c5cc9b(VS.80).aspx

Download snippets here: http://msdn.microsoft.com/en-us/vs2005/aa718338.aspx

Advertisements

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: