Export (0) Print
Expand All

ManagementClass.Methods Property

Gets or sets a collection of MethodData objects that represent the methods defined in the WMI class.

[Visual Basic]
Public ReadOnly Property Methods As MethodDataCollection
[C#]
public MethodDataCollection Methods {get;}
[C++]
public: __property MethodDataCollection* get_Methods();
[JScript]
public function get Methods() : MethodDataCollection;

Property Value

A MethodDataCollection representing the methods defined in the WMI class.

Example

[C#] 
ManagementClass c = new ManagementClass("Win32_Process");
foreach (Method m in c.Methods)
    Console.WriteLine("This class contains this method : ", m.Name);
   
[Visual Basic] 
Dim c As New ManagementClass("Win32_Process")
Dim m As Method
For Each m in c.Methods
     Console.WriteLine("This class contains this method : " & m.Name)
   

[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic or C# example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

ManagementClass Class | ManagementClass Members | System.Management Namespace

Show:
© 2014 Microsoft