• 4 hours
  • Easy

Free online content available in this course.

course.header.alt.is_video

course.header.alt.is_certifying

Got it!

Last updated on 3/28/24

Improve your code experience with a code editor

What's a code editor?

In the last chapter, we went through an example of writing code in Notepad, a standard text editor for Windows. But, as with any text editor, you can only enter text, make indentations, and change font size.

With a code editor, you'll have more control over the formatting of your code for better readability. Besides the ability to change fonts and colors, it also provides simple code completion and indentation based on the selected programming language (i.e., C#, C++, Java).

In the following code example, we will open the Program.cs file from the last chapter into a code editor. You will notice that the editor has added line-numbers along with color-coding for the methods, properties, and values for better readability.

What code looks like in a code editor!
What code looks like in a code editor! 

Building & running

Even though we're using a code editor instead of a text editor, we still have to follow the same process in compiling, testing, and running the application. Follow the same steps from the last chapter:

  1. Launch the Command Prompt in Windows

  2. Change the directory to the following: cd C:\Windows\Microsoft.NET\Framework\v4*

  3. Run the following command: msbuild "C:\\HelloWorld\HelloWorld.sln" /p:Configuration=Release /p:Platform="Any CPU"

  4. In File Explorer, locate the HelloWorld directory

  5. Double-click on HelloWorld.exe located in \HelloWorld\bin\Release

Visual Studio Code: a smarter code editor

In 2015, Microsoft introduced their light-weight code editor, Visual Studio Code for both Windows and Macintosh environments.

The nice thing with Visual Studio Code is that it can be enhanced with extensions from the Microsoft Marketplace.

In the video below, let's go through some of the nice features of Visual Studio Code.

Let's recap!

  • Code editors provide more functionality than a text editor.

  • Code editors provide improved readability.

  • Code editors can be enhanced with additional features.

Example of certificate of achievement
Example of certificate of achievement