messagebox show c# code example
Example 1: how to do a messagebox in c#
MessageBox.Show("Content", "Title", MessageBoxIcon.Error)
Example 2: action upton execution of ok button in msg box win forms
if (MessageBox.Show("Are you sure?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
// user clicked yes
}
else
{
// user clicked no
}