private void deleteLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { DialogResult confirm = MessageBox.Show("Are you sure you want to delete '" + assignment.title + "'?", "Confirm deletion", MessageBoxButtons.YesNo); if (confirm != DialogResult.Yes) { return; } APIHandler.DeleteAssignment(assignment); ParentRefreshList(); }