Monday, March 3, 2008

Program Structure in C#

_____________________________________________

Program Structure in C#.

_____________________________________________

End Namespace using System;

namespace Hello {
public class HelloWorld {
public static void Main(string[] args) {
string name = "C#";

// See if an argument was passed from the command line
if (args.Length == 1)
name = args[0];

Console.WriteLine("Hello, " + name + "!");
}
}
}

____________________________________________________________________

Note:Applicable for .net also asp.net.
____________________________________________________________________

No comments: