[This is preliminary documentation and is subject to change.]
When implemented in a derived class, executes when a Stop command is sent to the service by the Service Control Manager (SCM). Specifies actions to take when a service stops running.
| C# | Visual Basic | Managed C++ | J# |
protected override void OnStop ()
Protected Overrides Sub OnStop
protected: virtual void OnStop () override
protected void OnStop ()