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
How can i do insert more data with insert query with more select statment linqToSQL?
Desktop Dating Site - criminal activity - given new web privacy laws for such as Facebook
Outlook 2007 Continually asks for an Exchange Server password
My facebook landing page link does not work
Sync Center and Moving Redirected Folder in SBS2008
Problems with Remote Desktop
bootable usb
asp.net + modal popup
Active Directory - Constant user account lock outs
B Tree