//Alterar Aluno private void btnCancel_Click(object sender, EventArgs e) { string sexo = cmbSexo.Text; sexo = sexo.Substring(0, 1); Aluno aluno = new Aluno(); aluno.Id = int.Parse(txtId.Text); aluno.Nome = txtNome.Text; aluno.Sexo = sexo; aluno.Telefone = txtTelefone.Text; aluno.Alterar(aluno); MessageBox.Show("Aluno alterado com sucesso!"); }