other loops in c#

private void Button1_Click(object sender, EventArgs e)
        {
            int i = 0;
            while (i < 10)
            {
                textBox1.Text += i.ToString();
                i++;
            }
    }
   

do while loop:
 private void Button1_Click(object sender, EventArgs e)
        {
            int i = 0;

            do
            {
                textBox1.Text += i.ToString();
                i++;
            } while (i < 10);

        }

Comments

Popular posts from this blog

&& and || in C# application

My Google service terms and conditions