Site icon T4Tutorials.com

First Program in C Sharp

Step 1:

Open visual studio.

How to start visual studio

Step 2:

Open visual studio

How to start a new project in visual studio

Step 3:

Visual C#  is selected. Now select “console application”  and then change the name according to your choice.

How to open console application in visual studio

Step 4:

Starting view of visual studio before writing program looks like mentioned below;

starting view of visual studio before writing program

Step 5:

Write the program

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace T4Tutorials.com
{
    class Program
    {
        static void Main(string[] args)
        {
            System.Console.Out.WriteLine("Welcome to T4Tutorials.com");
        }
    }
}

Step 6:

Execute the program by short keys

Execute the program by interface

How to debug code in visual studio

Output

welcome to t4tutorials

List of programs

First Program in C Sharp

C# Program to add two numbers

 

Exit mobile version