I wrote a windows service and a gui for it. Of course gui mainly depends on the service. Is there a way for gui to wait for the service? Sometimes I need to reload service c
ServiceController has a method WaitForStatus where you pass it an argument of type ServiceControllerStatus. You can use it like this:
controller.WaitForStatus(ServiceControllerStatus.Running);