Saturday, December 26, 2009

Starting with C#, creating "Hello World" application.

Creating "Hello World" application is the start point in all programming languages. So this code is in console application:

using System;

public class hellowolrd
{
public static void Main()
{
Console.WriteLine("Hello, World!");
}
}



Now let's talk about the code so you can understand it. The first thing is the class, every "Main" method must have a class so in this tutorial i chose "helloworld". The name of the class can be what ever you want but i always put the name of the program that I am coding. Next the "using.System" class is very important because you will use it in every program that you make. So "using.System" contains a "WriteLine" method that can be used to show the string, in this case "Hello, World!". This is the simple ConsoleApplication "Hello, World!" tutorial.