MessageBox.Show("text", "title", MessageBoxButtons.OK, MessageBoxIcon.Warning);
MessageBox.Show("Content", "Title", MessageBoxIcon.Error)
//MessageBox.Result
DialogResult result = MessageBox.Show("Do you like cats?", "Yes or No?", messageBoxButtons.YesNoCancel);
if (result == DialogResult.Yes)
;
else if (result == DialogResult.No)
;
else
;
DialogResult result = MessageBox.Show("Do you want to save changes?", "Confirmation", MessageBoxButtons.YesNoCancel);
if(result == DialogResult.Yes)
{
//...
}
else if (result == DialogResult.No)
{
//...
}
else
{
//...
}