c# error message box code example
Example 1: c# messagebox yes no
DialogResult dialogResult = MessageBox.Show("Sure", "Some Title", MessageBoxButtons.YesNo);
if(dialogResult == DialogResult.Yes)
{
}
else if (dialogResult == DialogResult.No)
{
}
Example 2: c# error messagebox
MessageBox.Show("your message",
"window title",
MessageBoxButtons.OK,
MessageBoxIcon.Warning
);
Example 3: c# MessageBox
MessageBox.Show("text", "title", MessageBoxButtons.OK, MessageBoxIcon.Warning);
Example 4: messagebox.show c# error
MessageBox.Show("Some text", "Some title",
MessageBoxButtons.OK, MessageBoxIcon.Error);