Creating Our First Program In C#| C# Tutorials #2
Before creating our first program we will create a project.
Step 1: Open Visual Studio.
Step 2: Click on "Create New Project"
Step 3: Select Language C#. Choose a platform(Our OS).
Step 4: The project type will be 'console'
Our first program is printing of "HelloWorld"
Code:-
1
2using System;
3using System.Collections.Generic;
4using System.Linq;
5using System.Text;
6using System.Threading.Tasks;
7
8
9
10namespace ConsoleApp1 // The namespace is like a container it stores Classes and methods//
11
12{
13 class Program
14
15 {
16 static void Main(string[] args)
17
18 {
19 Console.WriteLine("hello world"); // This Command for printing is given of value.
20 Console.ReadLine(); // This Command for pause results for seeing clearly.
21
22 }
23
24 }
25
26}