.NET Development Foundation/Hello world

System types and collections: Hello world example

Hello world example
Note: when you create a new console project in Visual studio, all the code is generated by default except for the 3 "Console" lines in the Main method. Just add those 3 lines and run the program.

We have discussed all the parts of that program except for the role of the Console which will be discussed in the input/output section (Stream). For now, lets say that it is a System class, in the System namespace (the "using System" instruction makes the "System." part of "System.Console.Writeline" optional) and that the WriteLine and ReadLine methods write and read strings to and from the console.