private void button1_Click(object sender, EventArgs e) { var comboBoxes = this.Controls.OfType <ComboBox>().Where(x => x.Name.StartsWith("comboBox")).Reverse(); foreach (var cmbBox in comboBoxes) { if (cmbBox.Text != NotSelected) { City selected = cities.Find(u => u.name == cmbBox.Text); connect.AddVendor(textBox1.Text, textBox2.Text, selected.id); } } MessageBox.Show("Eklendi!"); }