THis is my vb.net code
I am receiving an error,
Class 'myprojectname. managementobjec t' cannot be indexed because it has no default property
Code:
Public Class TS_Service ' Is the service running? ' Returns true if we need to start the service Public Function CheckService(ByVal PC As String) As Boolean Dim obj As ManagementObject obj = New ManagementObject("\\" & PC & "\root\cimv2:Win32_Service.Name='SBAMSvc'") ' If Not IsNothing(obj) Then If obj("State").ToString = "Running" Then Return False 'End If End If Return True End Function
I am receiving an error,
Class 'myprojectname. managementobjec t' cannot be indexed because it has no default property
Comment