6
Answers

Loop

Arnold Petrona

Arnold Petrona

16y
3.7k
1
I have a listbox.item.count and it is in a loop. With this loop int m is included

Now I have as follow:

 private void button4_Click(object sender, EventArgs e)
    {
            
            int y = listBox1.Items.Count;
            for ( m = 0; m < listBox1.Items.Count; m++)
            {
                for ( a = 1; a <= 5; a++)
                {
                    this.halo();
                }
             }
                        if ( m = = listBox1.Items.Count)
                        {
                           m = 0;
                          ......................................;
                         }
  }

        private void halo()
        {  
           dataGridView1.Rows.Add(a, listBox1.Items[m].ToString());
         }

I don't know in the part where ..........................; to go start back again in the listbox1.Item.Count loop


Answers (6)
Next Recommended Forum