This documentation is archived and is not being maintained.
PropertyData Class
.NET Framework 1.1
Represents information about a WMI property.
For a list of all members of this type, see PropertyData Members.
System.Object
System.Management.PropertyData
[Visual Basic] Public Class PropertyData [C#] public class PropertyData [C++] public __gc class PropertyData [JScript] public class PropertyData
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.
Example
[C#] using System; using System.Management; // This sample displays all properties that qualifies the "DeviceID" property // in Win32_LogicalDisk.DeviceID='C' instance. class Sample_PropertyData { public static int Main(string[] args) { ManagementObject disk = new ManagementObject("Win32_LogicalDisk.DeviceID=\"C:\""); PropertyData diskProperty = disk.Properties["DeviceID"]; Console.WriteLine("Name: " + diskProperty.Name); Console.WriteLine("Type: " + diskProperty.Type); Console.WriteLine("Value: " + diskProperty.Value); Console.WriteLine("IsArray: " + diskProperty.IsArray); Console.WriteLine("IsLocal: " + diskProperty.IsLocal); Console.WriteLine("Origin: " + diskProperty.Origin); return 0; } } [Visual Basic] Imports System Imports System.Management ' This sample displays all properties that qualifies the "DeviceID" property ' in Win32_LogicalDisk.DeviceID='C' instance. Class Sample_PropertyData Overloads Public Shared Function Main(args() As String) As Integer Dim disk As New ManagementObject("Win32_LogicalDisk.DeviceID=""C:""") Dim diskProperty As PropertyData = disk.Properties("DeviceID") Console.WriteLine("Name: " & diskProperty.Name) Console.WriteLine("Type: " & diskProperty.Type) Console.WriteLine("Value: " & diskProperty.Value) Console.WriteLine("IsArray: " & diskProperty.IsArray) Console.WriteLine("IsLocal: " & diskProperty.IsLocal) Console.WriteLine("Origin: " & diskProperty.Origin) 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
in the upper-left corner of the page.
Requirements
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
Show: