Book Image

Visual Studio 2015 Cookbook - Second Edition

By : Jeff Martin
Book Image

Visual Studio 2015 Cookbook - Second Edition

By: Jeff Martin

Overview of this book

Visual Studio 2015 is the premier tool for developers targeting the Microsoft platform. Learning how to effectively use this technology can enhance your productivity while simplifying your most common tasks, allowing you more time to focus on your project. Visual Studio 2015 is packed with improvements that increase productivity, and this book walks you through each one in succession to help you smooth your workflow and get more accomplished. From customization and the interface to code snippets and debugging, the Visual Studio upgrade expands your options — and this book is your fast-track guide to getting on board quickly. Visual Studio 2015 Cookbook will introduce you to all the new areas of Visual Studio and how they can quickly be put to use to improve your everyday development tasks. With this book, you will learn not only what VS2015 offers, but what it takes to put it to work for your projects.
Table of Contents (17 chapters)
Visual Studio 2015 Cookbook Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Creating your own snippets


Visual Studio snippets are a great way to quickly write repetitive chunks of code that follow the same basic structure—potentially, saving you from 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—simply write the code correctly once, and then reuse.

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 CSS styles can be consistently applied to your web pages. Unfortunately, out-of-the-box Visual Studio still doesn't have an inbuilt way of authoring snippets, so you will have to write some XML. Fortunately, it only takes a few...