private void mostrarLista() { StringBuilder errorMessages = new StringBuilder(); try { if ((edi.OptenerPais(edi)).v_pais.Count != 0) { SLpais = new SortedList(); foreach (String pais in edi.v_pais) { SLpais.Add(pais, pais); } com_pais.DataSource = SLpais.GetValueList(); com_pais.SelectedItem = edi.v_Dpais; com_pais.Show(); } } catch (SqlException ex) { for (int i = 0; i < ex.Errors.Count; i++) { errorMessages.Append("Index #" + i + "\n" + "Message: " + ex.Errors[i].Message + "\n" + "LineNumber: " + ex.Errors[i].LineNumber + "\n" + "Source: " + ex.Errors[i].Source + "\n" + "Procedure: " + ex.Errors[i].Procedure + "\n"); } Console.WriteLine(errorMessages.ToString()); MessageBox.Show(ex.Errors[0].Message.ToString(), "Modificar Editorial", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }