John Baird
Coatesville, Pennsylvania, United States
General information
Category:
Coding, syntax and commands
Environment versions
Network:
Windows 2003 Server
I wonder if it's not just a matter of semantics - or how one thinks about it?
static void Main(string[] args)
{
int[] aryInts = new int[5] { 0, 1, 2, 3, 4 };
foreach (int j in aryInts) {
if (j == 3) {
Console.WriteLine("Three.");
}
}
foreach (int j in aryInts)
{
if (j != 3)
{
continue; //Skips to closing foreach brace then returns to top
}
Console.WriteLine("Three too!");
}
}
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only