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
The Microsoft Office Access database engine cannot find a record in the table with key matching field(s)
Multicast session fails to open on secondary site server.
Get active workbook name C#
Ruby's Page - Open speed
Joomla CiviCRM problem
About direct X / Open GL issue
Warning Box in Outlook
Multiple ICA session for the same user
How can I list all the properties and values of an object in ASP.NET?
Multi-threading and row locking on selects