Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library

ManagementBindAttribute Class

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Defines an attribute on a class constructor that is used to attach a class instance to a specific WMI instance resulting from a get operation. A constructor that has this attribute should assign values to all instrumented properties of the class because they will be relayed to the client. The target of this attribute must be either a method or a static method.

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

[AttributeUsageAttribute(AttributeTargets.Constructor|AttributeTargets.Method, AllowMultiple = false)]
public sealed class ManagementBindAttribute : ManagementNewInstanceAttribute
Not applicable.

The following example shows how to use the ManagementBind attribute to mark the constructor of a class.

[C#]

// Use the ManagementBind attribute to specify that this constructor
// is used to attach a class instance to a specific WMI
// instance. The constructor should set the values of the
// key properties of the WMI instance.
[ManagementBind]
public ClassConstructor(int Id)
{
     // Set this class instance to a specific instance
     // by assigning property values and 
     // giving unique values to the key properties. 
}

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

Windows Server 2003, Windows XP SP2, Windows Vista

The .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.5
Show:
© 2015 Microsoft