ServiceController.Pause Method
.NET Framework 3.0
Suspends a service's operation.
Namespace: System.ServiceProcess
Assembly: System.ServiceProcess (in system.serviceprocess.dll)
Assembly: System.ServiceProcess (in system.serviceprocess.dll)
The following example demonstrates the use of the Pause method to pause a service. This example is part of a larger example that is provided for the ServiceController class.
- ServiceControllerPermission for controlling services on the computer. Associated enumeration: ServiceControllerPermissionAccess.Control
- SecurityPermission for unrestricted access to service information. Associated enumeration: PermissionState.Unrestricted