private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { var selectedLocation = (sender as ComboBox).SelectedItem as string; images = DataAcces.GetImages(locations.Find(x => x.Localitate == selectedLocation).Id); comboBox2.Items.Clear(); comboBox2.Items.AddRange(images.ToArray()); }