List Services Available in Your PC

This blog demonstrates how to list services available in our computer using c#, to list services you need to take reference of  System.ServiceProcess namespace available in Microsoft visual studio
 
Code

ServiceController[] SERVICEL = ServiceController.GetServices();
foreach (ServiceController sc in SERVICEL)
{
     Console.WriteLine(sc.ServiceName);
}
 
Ebook Download
View all
Learn
View all