Chapter 8Code Snippets and Refactoring

Wrox.com Code Downloads for this Chapter

The wrox.com code downloads for this chapter are found at www.wrox.com/go/professionalvisualstudio2015 on the Download Code tab. The code and any related support files are located in their own folder for this chapter.

One of the advantages of using an integrated development environment (IDE) over a plain text editor is that it's designed to help you be more productive and efficient by enabling you to write code faster. Two of Visual Studio 2015's most powerful features that help increase your productivity are its support for code snippets and the refactoring tools that it provides.

Code snippets are small chunks of code that can be inserted into an application's code base and then customized to meet the application's specific requirements. They do not generate full-blown applications or whole files, unlike project and item templates. Instead, code snippets are used to insert frequently used code structures or obscure program code blocks that are not easy to remember. In the first part of this chapter, you see how using code snippets can improve your coding efficiency enormously.

This chapter also focuses on Visual Studio 2015's refactoring tools — refactoring is the process of reworking code to improve it without changing its functionality. This might entail simplifying a method, extracting a commonly ...

Get Professional Visual Studio 2015 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.