Advertise with us

How to show Yes or No button in MessageBox using C#?

Posted by  Ankit Singh
C# 
C#
 2220  View(s)
Ratings:
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!

  1. Re: How to show Yes or No button in MessageBox using C#?

    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);

      Modified On Mar-31-2018 06:37:51 AM

Answer