Home > VS 2010 > Snippet Designer

Snippet Designer

The snippet designer is a very cool plugin and productivity tool for VS2010. This is very useful for creating custom code snippet/template and the best part is you can export an existing code into custom snippet .I will walk you through step by step on how to maximize it’s use.

Step 1: Download it from codeplex and install.

Step 2: Take your existing code and convert into a snippet.

Step 3: Transform the key code into replacements variables(like macros) by decorating it with “$” on the both ends. In this case I have decorated both the interface IDrive and the method DriveMethod(). ( I know it just should be Drive but I am thinking more from templating point of view)

Step 4: On the properties of the snippet code file set the shorcut word which when typed will generate the code stub.

Step 5: Save the file under Code snippet directory structure.

Step 6:Type in the shortcut,tab it and viola the code is generated.

This could be very useful for your day in day out interface, business layer, service layer kind of code snippet.

Categories: VS 2010 Tags: ,
  1. No comments yet.
  1. August 12, 2010 at 4:13 am

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: