tags:

views:

199

answers:

3
foreach(int i in array1)
{    
    Console.WriteLine(i);
}

What is "Console" in this context?

+7  A: 

in this case, Console is old-school DOS, AKA "STDOUT" or "standard out"
here is an MSDN link

Muad'Dib
A: 

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.

vfilby
+1  A: 

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

Kevin