Let’s begin with our first simple “Hello World” program. In
this program I will write simple program and using “System” namespace in which
Console class I call static WriteLine method.
First install c# compiler to run C# program logic or check my previous blog how to install .Net SDK.
After installing the compiler, you can type following code
to your C# editor.
using System;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World");
Console.Read();
}
}
}
Now you can compile HelloWorld.cs file.
csc c:\temp\HelloWorld.cs
No comments:
Post a Comment