Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# messagebox yes no

DialogResult dialogResult = MessageBox.Show("Sure", "Some Title", MessageBoxButtons.YesNo);
if(dialogResult == DialogResult.Yes)
{
    //do something
}
else if (dialogResult == DialogResult.No)
{
    //do something else
}
Comment

wpf yes no message box exit

var response = MessageBox.Show("Do you really want to exit?", "Exiting...",
                                      MessageBoxButton.YesNo, MessageBoxImage.Exclamation);
            if (response == MessageBoxResult.No)
            {
                e.Cancel = true;
            }
            else
            {
                Environment.Exit(0);
            }
Comment

c# messagebox yes no "wpf"

// This one for WPF

if (MessageBox.Show("Close Application?", "Question", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No)
{
  //do no stuff
}
else
{
  //do yes stuff
}
Comment

MessageBox yes no C#

DialogResult dialogResult = MessageBox.Show("Question", "Caption", MessageBoxButtons.YesNo);
if(dialogResult == DialogResult.Yes)
{
    //do something
}
else
{
    //do something else
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: prevent page refresh 
Csharp :: debug c# console 
Csharp :: read folder c# 
Csharp :: how to use distinct in linq query in c# 
Csharp :: c# void 
Csharp :: c# foreach dictionary 
Csharp :: c# map 
Csharp :: void ontriggerenter not working 
Csharp :: c# run loop x times 
Csharp :: console.writeline c# 
Csharp :: c# do while loop 
Csharp :: polybius square 
Csharp :: unity how to get the side ways velocity of a object 
Csharp :: c# timestamp now 
Csharp :: dialog box with form flutter 
Csharp :: unity log error 
Csharp :: c# get datatable column names to list 
Csharp :: how to convert pdfdocument to binary in c# 
Csharp :: system.io.directorynotfoundexception c# 
Csharp :: if number negative c sharp 
Csharp :: c# datetime format ymd 
Csharp :: how to check if a path is a directory or file c# 
Csharp :: inline creation dictionnary C# 
Csharp :: linq where 
Csharp :: c# change label from thread 
Csharp :: unity 3d camera movement script 
Csharp :: project mongodb c# 
Csharp :: c# oops concept 
Csharp :: unity print vs debug log 
Csharp :: datetimeoffset to datetime c# 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =