exit programm csharp

Code Example - exit programm csharp

                
                        Application.Exit();
                    
                
 

how to exit application csharp console

                        
                                System.Environment.Exit(0);
// or
Environment.Exit(0);
                            
                        
 

csharp exit application

                        
                                // In a console application:
Environment.Exit(0);
// In a WPF application:
Close();
                            
                        
 

csharp how to exit program

                        
                                System.Environment.Exit(1);
                            
                        
 

csharp program exit

                        
                                System.Windows.Forms.Application.ExitThread( )
                            
                        
 

csharp exit

                        
                                // In a console application:
Environment.Exit(0);
// In a WPF application:
Close();
                            
                        
 

exit a method csharp

                        
                                private void Test(int condition)
{
  if(condition)
    return; // Exit the methode

  // Here code if condition == false
}
                            
                        
 

how to close an application in csharp

                        
                                this.Close();
//This only close the current form or window that you are using.
                            
                        
 

csharp application exit

                        
                                private void button1_Click(object sender, EventArgs e) // this is your button double click your button and you will find it
        {
            Application.Exit();
        }