ManagementKeyAttribute Class
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.] Namespace: System.Management
Assembly: System.Core (in System.Core.dll)
Defines the key identifier properties of the class. A class can have one key identifier property, or multiple key identifier properties. The combination of key property values for a certain instance of a class must be unique when compared to any other combination of key property values for another instance of the class. The key property values can be used to uniquely identify an instance.
Assembly: System.Core (in System.Core.dll)
The following example shows how to use the ManagementKey attribute to mark a unique property of a class.
[C#]
// Use the ManagementKey attribute to specify that this property
// is used as the key identifier of this class and for the WMI
// instances of this class. This property must be unique for each
// class instance.
[ManagementKey]
public int Id
{
get { return System.Diagnostics.Process.GetCurrentProcess().Id; }
}
System.Object
System.Attribute
System.Management.ManagementMemberAttribute
System.Management.ManagementKeyAttribute
System.Attribute
System.Management.ManagementMemberAttribute
System.Management.ManagementKeyAttribute
Show: