Application.ApplicationExit : Application « System.Windows.Forms « C# / C Sharp by API






Application.ApplicationExit

 

using System;
using System.Windows.Forms;

public class MainClass : System.Windows.Forms.Form
{
  public MainClass()
  {
    Application.ApplicationExit += new EventHandler(Form_OnExit);
  }

  [STAThread]
  static void Main() 
  {
    Application.Run(new MainClass());
  }
  private void Form_OnExit(object sender, EventArgs evArgs) 
  {
    Console.WriteLine("Exit");
  }
}

   
  








Related examples in the same category

1.Application.AddMessageFilter
2.Application.CompanyName
3.Application.Idle
4.Application.ProductName
5.Application.RemoveMessageFilter
6.Application.Run
7.Application.StartupPath
8.Application.ThreadException
9.Application.ThreadExit