What property name should be added to this code snippet to allow a service to resume after pausing? if (FMServiceController.MISSING CODE) FMServiceController.Continue(); else MessageBox.Show("Service cannot be continued.");
-
CanContinue
-
CanPauseAndContinue
-
CanResume
-
Continue
B
Correct answer
Explanation
The CanPauseAndContinue property of ServiceController indicates whether the service can be paused and resumed. Before calling Continue(), you should check this property to ensure the service supports pause and continue operations. Without this check, attempting to continue a non-pausable service would throw an exception.