Creating your own snippets

Visual Studio snippets are a great way to quickly write repetitive chunks of code using the same basic structure and can save you a lot of time and typing. Snippets have been extended to work on more than just standard code files, and should be considered whenever you find yourself writing similar code over and over. Using snippets can save time and reduce the possibility of bugs: write the code correctly once and then re-use.

For example, you may want to generate a class signature that inherits from a specific base class you use in your application, or you may have a certain attribute that needs to be placed above method calls to enable logging, or you may have specific IDs you want to use in HTML elements to ensure ...

Get Visual Studio 2013 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.