Home > DeveloperSection > Forums > How to show Yes or No button in MessageBox using C#?
Ankit Singh

Total Post:341

Posted on    October-07-2013 8:37 AM

 C# C# 

 1 Reply(s)
 967  View(s)
Rate this:

I am beginner in C# window Application I am show a Messagebox using MessageBox.Show("Pass Any String") this code of line only show a message box with Ok button but I want to show Yes or No button in Message box please anybody help for resolving this problem.

Thanx in Advanced!

Jeet Verma
Jeet Verma

Total Post:110

Posted on    October-08-2013 12:52 AM

You can use below line of code for showing Yes or No button in a message box: -

MessageBox.Show("Pass the message", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

Don't want to miss updates? Please click the below button!

Follow MindStick