foreach(int i in array1)
{
Console.WriteLine(i);
}
What is "Console" in this context?
foreach(int i in array1)
{
Console.WriteLine(i);
}
What is "Console" in this context?
in this case, Console is old-school DOS, AKA "STDOUT" or "standard out"
here is an MSDN link
If you are running this app in a command app (cmd.exe) that text will be printed to the screen. It won't be visible if you are running as a windows app.
This means that you are writing out the value of i to the console Window
Console.Writeln(i);
Actually it should be:
Console.WriteLine(i);
Console WriteLine Method: http://msdn.microsoft.com/en-us/library/system.console.writeline.aspx
Console Class: http://msdn.microsoft.com/en-us/library/43zwz7ys.aspx