My new blog

My blog has moved to www.davehunter.co.uk/blog see you there.

Monday, 16 July 2007

Visual Studio .NET 2005 - Code Snippets Demo

VS.NET 2005 code snippets in action

The above Code snippets demostrates the following snippet types
  • Simple expansion
  • Template expansion (with variables)
  • Surround
Open the snippet manager
Ctrl+K, Ctrl+B

To activate a snippet ... start typing the name of the snippet
Tab,Tab (in C#)
?,Tab (in VB.NET)


.. and the snippet will appear. If it's a templated snippet:
Tab advances to the next field
Shift+Tab moves to the previous field
Enter completes the snippet and resumes editing at your previous cursor position
If you want to enclose code in a surrounding snippet (eg, you have code highlighted for a region), you must manually invoke snippet intellisense by pressing: Ctrl+K, Ctrl+X

Information from Jeff Atwood

No comments: