Get the properties in the ManagementClass : ManagementClass « Windows System « VB.Net






Get the properties in the ManagementClass

 


Imports System
Imports System.Management


Class Sample
    Public Overloads Shared Function Main(ByVal args() As String) As Integer
        Dim c As New ManagementClass("Win32_LogicalDisk")

        Dim methods As MethodDataCollection
        methods = c.Methods


        ' Get the properties in the class
        Dim properties As PropertyDataCollection
        properties = c.Properties

        ' display the properties
        Console.WriteLine("Property Names: ")
        For Each p As PropertyData In properties

            Console.WriteLine(p.Name)
        Next


    End Function
End Class

   
  








Related examples in the same category

1.Initialize a ManagementClass variable with a ManagementClass constructor.
2.Get the Qualifiers in the ManagementClass