private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { Class1 c1 = new Class1(); Class1 c2 = new Class1(); int index = e.RowIndex; DataGridViewRow selected_row = dataGridView1.Rows[index]; Mycheckclass m1 = new Mycheckclass(); m1.Ind = index; arrayuse y1 = new arrayuse(); y1.Addlist_itemj(m1); arrayuse u4 = new arrayuse(); c1.Name = selected_row.Cells[0].Value.ToString(); foreach (Class1 c3 in arrayuse.des) { if (c1.Name == c3.Name) { c2.Name = c3.Name; c2.Description = c3.Description; } u4.Addlist_item1(c2); } Form2 f1 = new Form2(); f1.Show(); this.Hide(); }
public void Addlist_itemj(Mycheckclass c1) { check.Add(c1); }