The FCL Support for Windows Services
In the .NET Framework SDK, the System.ServiceProcess namespace provides the classes that enable you to implement, install, and control Windows services. The main classes involved in working with Windows service applications are
The ServiceBase Class
A class that provides the base-level functionality for a Windows services application.
The ServiceProcessInstaller and ServiceInstaller Classes
Classes that enable you to use an installation utility such as installutil.exe to install a Windows services application.
The ServiceController Class
A class that enables a program to connect to a Windows service and perform various operations such as starting, stopping, querying etc.