private void ApagarYoutuber() { if (dataGridView1.CurrentRow == null) { MessageBox.Show("Selecione algum Youtuber"); return; } string name = dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[0].Value.ToString(); dataGridView1.Rows.RemoveAt(dataGridView1.CurrentRow.Index); YoutuberRepository repositorio = new YoutuberRepository(); repositorio.ApagarYoutuber(name); MessageBox.Show(name + "Removido com Sucesso"); }