Monday, July 26, 2004

Insert snippets - Visual Studio 2005

The Visual Studio .NET Code Editor provides a Code Snippet Inserter that allows you, in a few mouse clicks, to select ready-made blocks of code and insert them into the active document.

The procedure to display the Code Snippet Inserter varies according to the language in which you are developing:

· Visual Basic - Right-click at the desired location in the Code Editor to display the Shortcut menu, and select Insert Snippet.
· Visual C# - From the IntelliSense menu, select Insert Expansion.
· Visual J# - From the Refactor menu, select Insert Expansion.
· Visual C++ - The Code Snippet Inserter is not available.

Picture1: Right click in the code editor and click Insert Snippet in the menu.



Picture2: Insert Snippet Dialog Box.



Picture3: Click the code you need in the Insert Snippet Dialog Box (Here we are clicking registry related).



Picture4: The code to set the value in the Registry!



What you guys thing about this feature. Add your comments/feedbacks/questions here!!!

No comments: