How to create a Messagebox with “Yes”, “No” choices and a DialogResult in C#?

DialogResult dialogResult = MessageBox.Show("Type Your Message", "Message Box Title", MessageBoxButtons.YesNo);
if(dialogResult == DialogResult.Yes)
{
    //Yes Result
}
else if (dialogResult == DialogResult.No)
{
    //No Result
}

0 comments:

Post a Comment