I get an object reference not set error on this line:

Code:
AppDomain.CurrentDomain.ProcessExit += new EventHandler(OnApplicationExit);
The method OnApplicationExit is a public void non-static. What should I do to get rid of this error beside making it static?