ServiceBase.Run Method (ServiceBase)
Assembly: System.ServiceProcess (in system.serviceprocess.dll)
Call this overload in the main() function of the service executable to load a single service. When you call Run on a service, it is loaded into memory. The service is not started until the Service Control Manager passes a Start command to the service.
ServiceBase.Run is called in much the same way as Application.Run for Windows Forms applications.
If AutoLog is true, an entry is written to the event log if the service specified by the service parameter fails to start.
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.