Core C#

Lesson 1 : Creating a Simple Program (2013)

In this C# video tutorial, we demonstrate how to create a simple C# program with Visual Studio 2013. To start you, should have a copy of Visual Studio 2013 installed. If you have a different version, the process should be very similar. To download the project, left-click the Download link to the right to the above video.

This video explains how to create a simple console application in C# and make it print out a message. Console applications are the simplest applications. So, this is the perfect place to start if you have no prior knowledge of C#. Follow the steps below.

  1. Navigate to the Start menu by left-clicking the Windows icon in the lower-left corner of your Desktop screen.
    Windows Desktop
  2. Then left-click the down arrow in the lower-left corner to go the Apps section and find the Visual Studio 2013 icon.
  3. Left-click the Visual Studio 2013 icon to open the Visual Studio 2013 application.
    Start Menu Apps
  4. Left-click FILE in the menubar, mouse over New in the submenu, and left-click Project in the submenu to open the New Project dialog.
    Select New Project
  5. Select Installed->Templates->Visual C#->Windows in the left-hand pane.
    Select Project Template
  6. Then left-click Console Application in the center pane.
    Select Console Application
  7. If you want to accept the default project name and location, left-click the OK button to finish creating the console application. Otherwise, you can first:
    1. Set the name of the project in the field next to "Name:" near the bottom of the dialog.
    2. Select a location by left-clicking the "Browse" button.
  8. Now the project is created. To get the program to do something, add the line
    Console.WriteLine("God is Love!");

    to the code file "Program.cs" so that the final code looks like this:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    
    namespace ConsoleApplication {
        class Program {
            static void Main(string[] args) {
                Console.WriteLine("God is Love!");
            }
        }
    }
    
  9. To compile and run the program, left-click DEBUG in the menubar and left-click Start Without Debugging in the submenu.
    Compile and Run
  10. When the program finishes compiling and runs, a console window should open like this one with the message "God is Love!" inside of it.
    Program Output
 

© 2007–2024 XoaX.net LLC. All rights reserved.