01 May 2010

Short cut for reusable code in toolbox in Visual Studio

Sometime we need some part of coding frequently in a single or multiple application. What we do in this situation ? Just copy the source code and paste it to the destination.

Now, Visual Studio have a great feature instead of copy-paste the source code. For saving the require code at the toolbox, you just need to follow below 3 simple steps.
  1. Select the code snippets
  2. Drag it to the toolbox --> General tab area
  3. Drop it!!

It is too simple process. Even you can rename the code snippet with the appropriate name also. for that you have to just right click the code snippet and click on the rename option.


Finally, you can use this code snippet in any area of the visual studio application by just drag and drop of the selected code snippet.

Hope this will help you. :)

No comments:

Post a Comment