Presently how about we start C#.Net programming with first C# program that is “print Hello world” which is the principal program of all programming dialects.
Here are the basic advances, how to compose the first C#.Net comfort program in Visual Studio:
To compose a basic reassure based program. First, we have to open Visual Studio, which is an IDE (Integrated Development Environment) for creating an application. These are straightforward advances:
- First, snap-on FILE menu.
- Select the new task choice.
- Then after window will show up on your screen.
- From the above screen select language (Visual C#) and afterwards pick Console Application and name the application and pick a way to spare application. After that Visual studio creates test code.
- In the above program, visual studio naturally includes some namespaces. In any case, for “Hello World” application just System namespace is required.
Program
using System;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World");
}
}
}
Output
Here, in this program HelloWorld is the namespace that we made, Namespace may contain numerous classes however in this program it contains just one class named program and primary() is the technique for class which is a passage purpose of the program.