The type or namespace name ‘ServiceController’ could not be found

using System.ServiceProcess;
ServiceController svcController = new ServiceController("Test Windows Service");if (svcController != null)
{
try
{
//svcController.Stop();
//svcController.WaitForStatus(ServiceControllerStatus.Stopped, TimeSpan.FromSeconds(10));
svcController.Start();
}
catch
{
}
}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store