C#: detect/listen for service startup and shutdown
===

I have a C# application that uses a Windows service that is not always on and I want to be able to send an email notification when the service starts and when it shuts down. I have the email script written, but I cannot seem to figure out how to detect the service status changes.

I have been reading up on the ServiceController class and I think that the WaitForStatus() method might be what I need, but I haven't been able to find an example with it being used on a service that is not yet started. 
 
&nbsp;

More:

  - the service will not be started by the application - the application user will be starting that directly from the Services window in the Administrative Tools. 
  - the service used is not a default Windows service - it is a custom service designed for use with this application
  

&nbsp;

Thanks for your help! 