Writing Code in the Code Editor

Because the code editor’s primary purpose is “word processing” for source code, let’s first look at writing the simplest of routines, a “Hello, World” function, from the ground up using the code editor.

Figure 6.4 shows a code editor with an initial stubbed-out console file. This was produced by creating a new Visual C# Console project using the Solution Explorer. Double-clicking the Program.cs file within that new project displays the source code for this console application.

Image

FIGURE 6.4 Code template for a Console code file.

As you can see, Visual Studio, as a result of the template used for creating the project, ...

Get Microsoft Visual Studio 2015 Unleashed, Third Edition 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.