Today I have installed the Visual Studio 2010 on my notebook and start exploring the product by writing the first C# Program and as usual "Console Application" like “Hello World”. So I thought those who are new in programming through this article HowTo your first console application programming.
Main Method:
In simple words Main Method in which you creates objects and execute Method or it is basically where controls starts and ends mainly.
Input and Output:
In C# program generally uses input and output service provided by the run time library of the .Net Framework. The statement system.console.writeLine (“Hello World”); uses the writeLine Method to write string
Readkey:
It prevent from closing the console windows, so you can have a chance to read
Example:
Using system;
Namespace Helloworld
{
class program
{
Static void main (string[] args)
{
console.writeLine (“Hello World!”)
// Preventing Console to close.
console.writeLine (“Press any key to exit”);
console.Readkey ();
}
}
}
cheer.