how to close an application in csharp

Code Example - how to close an application in csharp

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

csharp exit application

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

exit programm csharp

                        
                                Application.Exit();
                            
                        
 

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
}