Chapter 7. Working with Visual Studio’s Productivity Aids

In Chapter 6, “Introducing the Editors and Designers,” we discussed the basic capabilities of the designers and editors in Visual Studio 2015. In this chapter, we delve a bit deeper into their capabilities and those of other Visual Studio tools by examining the many productivity aids that the IDE provides. Many of these productivity enhancers are embedded within the text editors. Others are more generic in nature. But they all have one common goal: helping you, the developer, write code quickly and correctly.

If you recall from Chapter 6, in our coverage of the editors, we used a basic code scenario: a console application that printed "Hello, World!" to the console. In Figure 7.1, you see what the final code looks like in the code editor window.

Image

FIGURE 7.1 "Hello, World" in the code editor.

If you have followed along by re-creating this project and typing the "Hello, World!" code in Visual Studio, you have noticed that the productivity features of the code editor have already kicked into gear.

First, as you start to type, the code editor has tabbed in the cursor for you, placing it at a new location for writing nicely indented code.

Second, as you type your first line of code, Visual Studio reacts to your every keystroke by interpreting what you are trying to write and extending help in various forms (see Figure 7.2). You are given hints in terms of completing your in-progress source, provided information on the members you are in the process of selecting, and given information on the parameters required to complete a particular method. These features are collectively referred to as IntelliSense, and we explore its forms and functions in depth in this chapter.

Image

FIGURE 7.2 IntelliSense in action.

As you type, the IDE is also constantly checking what you have written with the compiler. If compile errors exist, they are dynamically flagged for you in the code editor with a red underline.

So for this one simple line of code, Visual Studio has been hard at work improving your coding productivity by doing the following:

Image Intelligently indenting the code

Image Suggesting code syntax

Image Displaying member descriptions to help you select the correct code syntax

Image Visually matching delimiting parentheses

Image Flagging code errors by constantly background compiling the current version of the source code

These features subtly help and coach you through the code-writing process and accelerate the act of coding itself.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset