Zebra0.com

csharp loopsLoops in C#

Loops in C#


Text of video

A do loop always executes at least once because the test is at the end.

//Add numbers 1, 2, 3 to list box, with DO loop
int num = 0;
do
{
   num++;
   lstNumbers.Items.Add(num);
} while (num <3);

That's all! Congratulations on completing all of the lessons in csharp!