This documentation is archived and is not being maintained.

ObjectGetOptions Class

Specifies options for getting a management object.

For a list of all members of this type, see ObjectGetOptions Members.


[Visual Basic]
Public Class ObjectGetOptions
   Inherits ManagementOptions
public class ObjectGetOptions : ManagementOptions
public __gc class ObjectGetOptions : public ManagementOptions
public class ObjectGetOptions extends ManagementOptions

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


using System;
using System.Management;

// This example demonstrates how to set a timeout value and list
// all amended qualifiers in a ManagementClass object.
class Sample_ObjectGetOptions
    public static int Main(string[] args) {
        // Request amended qualifiers
        ObjectGetOptions options =
            new ObjectGetOptions(null, new TimeSpan(0,0,0,5), true);
        ManagementClass diskClass =
            new ManagementClass("root/cimv2", "Win32_Process", options);
        foreach(QualifierData qualifier in diskClass.Qualifiers) {
            Console.WriteLine(qualifier.Name + ":" + qualifier.Value);
        return 0;
[Visual Basic] 
Imports System
Imports System.Management

' This example demonstrates how to set a timeout value and list
' all amended qualifiers in a ManagementClass object.
Class Sample_ObjectGetOptions
    Overloads Public Shared Function Main(args() As String) As Integer
        ' Request amended qualifiers
        Dim options As _
            New ObjectGetOptions(Nothing, New TimeSpan(0, 0, 0, 5), True)
        Dim diskClass As New ManagementClass( _
            "root/cimv2", _
            "Win32_Process", _
        Dim qualifier As QualifierData
        For Each qualifier In diskClass.Qualifiers
            Console.WriteLine(qualifier.Name & ":" & qualifier.Value)
        Next qualifier
        Return 0
    End Function
End Class

[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.


Namespace: System.Management

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

Assembly: System.Management (in System.Management.dll)

See Also

ObjectGetOptions Members | System.Management Namespace