dotnet / dotnet/dotnet-api-docs
CanStop details
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
In a service that inherits from ServiceBase, what is the default value of CanStop? Does it default to true? Is it based on the presence of an OnStop() override? Do we ever need to set this value, other than setting it to false for a service that can't stop?
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 986d4f38-1158-a27c-82b9-8744ffe4325c
* Version Independent ID: 49855b1c-be50-9dfb-9c75-fe6e264ca9b0
* Content: [ServiceBase.CanStop Property (System.ServiceProcess)](https://docs.microsoft.com/en-us/dotnet/api/system.serviceprocess.servicebase.canstop?view=netframework-4.7.2#System_ServiceProcess_ServiceBase_CanStop)
* Content Source: [xml/System.ServiceProcess/ServiceBase.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.ServiceProcess/ServiceBase.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**
Contributor guide
Assessment
This issue has not been assessed yet.