🎴 Flashcard Mode
.NET Windows Services & Design Patterns
Card1 / 20
Mastered0
Review0
QuestionClick to flip
Which class does a Windows service always inherit from?
AnswerClick to flip back
A
System.ServiceProcess.ServiceBase
💡 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.