private void button1_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Are you sure you want to change this genre?", "Change Genre", MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
     {
         name = (Genre)comboBox1.SelectedItem;
         name.name = textBox1.Text;
     }
 }
 private void button1_Click(object sender, EventArgs e)
 {
     string t="", caption="";
     if (text == "1")
     {
         t = "Are you sure you want to delete this genre?";
         caption = "Delete";
         if (MessageBox.Show(t, caption, MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
         {
             name = (Genre)comboBox1.SelectedItem;
         }
     }
     else if (text == "2")
     {
         name = (Genre)comboBox1.SelectedItem;
     }
 }