I want to make a MessageBox confirmation. Here is the message box:
MessageBox.Show(\"Do you want to save changes?\", \"Confirmation\", messageBoxButtons.YesNoCan
This answer was not working for me so I went on to MSDN. There I found that now the code should look like this:
//var is of MessageBoxResult type
var result = MessageBox.Show(message, caption,
MessageBoxButtons.YesNo,
MessageBoxIcon.Question);
// If the no button was pressed ...
if (result == DialogResult.No)
{
...
}
Hope it helps