Microsoft
Software
Hardware
Network
Question : C# the differences between Do While Loop and For
I have the following code, which basically do the same thing. However, they have different output layout. Can anybody help me to understand why the output layout is different? one is horizontal, one is vertical .
int counter = 1; // initialize counter
do
{
Console.Write("{0} ", counter);
++counter;
} while (counter <= 10); // end do...while
Console.WriteLine(); // outputs a newline
for (int i = 0; i < 11; i++)
{
Console.WriteLine(i);
}
Attachments:
doWhile-For.JPG
(21 KB)
(File Type Details)
doWhile&for
Answer : C# the differences between Do While Loop and For
one is write and the other is write line
Random Solutions
Exchange 2010 Domain Prep
Database on a 64 bit OS - Conection issues
is there a way to export GFI webmonitor Rules on isa 2006 for webgrade filter
time duration on cfchart y axis
Domain Controller rename and IP change
Sonicwall - Spam Filter - Exchange Interaction
Major help is needed customizing the Windows 7 default user profile
Auto file move and rename
Windows 7 NAT
Issue with Thecus 1u4500 not booting