Multiple choice technology architecture

Which class does a Windows service always inherit from?

  1. System.ServiceProcess.ServiceInstaller

  2. System.ServiceProcess.ServiceController

  3. System.ServiceProcess.ServiceBase

  4. System.ServiceProcess.ServiceProcessInstaller

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

All Windows services in .NET must inherit from ServiceBase, which provides the foundational service functionality and lifecycle methods (OnStart, OnStop, OnPause, OnContinue, etc.). ServiceController controls existing services, while ServiceInstaller and ServiceProcessInstaller are for installation purposes - none serve as a service base class.