List of Exercises

C# MessageBox Yes No Cancel

	
public partial class Form1 : Form
  {
    public Form1()
    {
      InitializeComponent();
    }
    private void button1_Click(object sender, EventArgs e)
    {
      var res = MessageBox.Show("This is a test messagebox!", "Warning", MessageBoxButtons.YesNoCancel);
      if (res == DialogResult.Yes)
      { }
      else if (res == DialogResult.No)
      { }
      else//cancel
      { }
    }
  }
	


Download the project of Visual Studio 2013 in DropBox Download


MessageBox in C#.net || Yes No Cancel || Windows Forms Application || Visual Studio 2013


Video Thumbnail