QualifierData.Value Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the value of the qualifier.
public:
property System::Object ^ Value { System::Object ^ get(); void set(System::Object ^ value); };
public object Value { get; set; }
member this.Value : obj with get, set
Public Property Value As Object
Returns an Object value containing the value of the qualifier.
The following example lists qualifier information about the Win32_Service class using the QualifierData class. For more information about Win32_Service, see the Windows Management Instrumentation documentation.
using System;
using System.Management;
public class Sample
{
public static void Main()
{
// Get the WMI class
ManagementClass mClass =
new ManagementClass("Win32_Service");
mClass.Options.UseAmendedQualifiers = true;
// Get the Qualifiers for the class
QualifierDataCollection qualifiers =
mClass.Qualifiers;
// display the Qualifier names
Console.WriteLine(mClass.ClassPath.ClassName +
" Qualifiers: ");
foreach (QualifierData q in qualifiers)
{
Console.WriteLine(q.Name);
}
Console.WriteLine();
Console.WriteLine("Class Description: ");
Console.WriteLine(
mClass.Qualifiers["Description"].Value);
}
}
Imports System.Management
Public Class Sample
Public Overloads Shared Function _
Main(ByVal args() As String) As Integer
' Get the WMI class
Dim mClass As ManagementClass = _
New ManagementClass("Win32_Service")
mClass.Options.UseAmendedQualifiers = True
' Get the Qualifiers for the class
Dim qualifiers As QualifierDataCollection = _
mClass.Qualifiers()
' display the Qualifier names
Console.WriteLine(mClass.ClassPath.ClassName & _
" Qualifiers: ")
For Each q As QualifierData In qualifiers
Console.WriteLine(q.Name)
Next
Console.WriteLine()
Console.WriteLine("Class Description: ")
Console.WriteLine( _
mClass.Qualifiers("Description").Value)
End Function
End Class
Qualifiers can only be of the following subset of CIM types: string, uint16, uint32, sint32, uint64, sint64, real32, real64, or bool.
The value of the qualifier.
Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: