ServiceType Property

ServiceController.ServiceType Property


Gets the type of service that this object references.

Namespace:   System.ServiceProcess
Assembly:  System.ServiceProcess (in System.ServiceProcess.dll)

member ServiceType : ServiceType with get

Property Value

Type: System.ServiceProcess.ServiceType

One of the ServiceType values, used to indicate the network service type.

Exception Condition

An error occurred when accessing a system API.


The service was not found.

The service type indicates how the service is used by the system. The value of the ServiceType property represents a set of flags combined using the bitwise OR operator.

The following example uses the ServiceController class to display the device driver services on the local computer.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft