messagebox ok C# code example
Example 1: c# yes or no dialog
DialogResult dialogResult = MessageBox.Show("Sure", "Some Title", MessageBoxButtons.YesNo);
if(dialogResult == DialogResult.Yes)
{
//do something
}
else if (dialogResult == DialogResult.No)
{
//do something else
}
Example 2: how to do a messagebox in c#
MessageBox.Show("Content", "Title", MessageBoxIcon.Error)