public void cargarSemestre() { try { MySqlDataAdapter dt = new MySqlDataAdapter(); dt = semestre.ConsultarSemestre(); DataTable table = new DataTable(); dt.Fill(table); cmbSemestre.ValueMember = "id"; cmbSemestre.DisplayMember = "Semestre"; cmbSemestre.DataSource = table; } catch (MySqlException e) { MessageBox.Show("Error >> " + e.ToString()); } }