Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ServiceBase::Stop Method ()

 

Stops the executing service.

Namespace:   System.ServiceProcess
Assembly:  System.ServiceProcess (in System.ServiceProcess.dll)

public:
void Stop()

The Stop method sets the service state to indicate a stop is pending and calls the OnStop method. After the application is stopped, the service state is set to stopped. If the application is a hosted service, the application domain is unloaded.

.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft