csharp exit application

Code Example - csharp exit application

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

how to exit application csharp console

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

exit programm csharp

                        
                                Application.Exit();
                            
                        
 

csharp how to exit program

                        
                                System.Environment.Exit(1);
                            
                        
 

csharp program exit

                        
                                System.Windows.Forms.Application.ExitThread( )
                            
                        
 

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