I was just surprised to find that "Else if" is not required in the code bit below.
Apparently "If" and "Else if" are used interchangeably . Please correct me if I'm wrong, but it
appears "Else" is just a stylistic choice.
for (int i = 1; i <= 100; i++)
{
if (i == 3)
continue;
if (i == 5)
break;
Console.WriteLi ne(i);
}
//Compiles just fine and I can tell no difference using this or "else if" in the second if
statement.
Thanks in advance,
Jack
--
--------------------------------- --- -- -
Posted with NewsLeecher v3.9 Beta 5
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -
Apparently "If" and "Else if" are used interchangeably . Please correct me if I'm wrong, but it
appears "Else" is just a stylistic choice.
for (int i = 1; i <= 100; i++)
{
if (i == 3)
continue;
if (i == 5)
break;
Console.WriteLi ne(i);
}
//Compiles just fine and I can tell no difference using this or "else if" in the second if
statement.
Thanks in advance,
Jack
--
--------------------------------- --- -- -
Posted with NewsLeecher v3.9 Beta 5
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -
Comment