QualifierDataCollection.QualifierDataEnumerator QualifierDataCollection.QualifierDataEnumerator QualifierDataCollection.QualifierDataEnumerator QualifierDataCollection.QualifierDataEnumerator Class

Definição

Representa o enumerador para objetos QualifierData no QualifierDataCollection.Represents the enumerator for QualifierData objects in the QualifierDataCollection.

public: ref class QualifierDataCollection::QualifierDataEnumerator : System::Collections::IEnumerator
public class QualifierDataCollection.QualifierDataEnumerator : System.Collections.IEnumerator
type QualifierDataCollection.QualifierDataEnumerator = class
    interface IEnumerator
Public Class QualifierDataCollection.QualifierDataEnumerator
Implements IEnumerator
Herança
QualifierDataCollection.QualifierDataEnumeratorQualifierDataCollection.QualifierDataEnumeratorQualifierDataCollection.QualifierDataEnumeratorQualifierDataCollection.QualifierDataEnumerator
Implementações

Exemplos

O exemplo a seguir enumera todos os qualificadores na Win32_LogicalDisk de classe e exibe seus valores.The following example enumerates through all the qualifiers in the Win32_LogicalDisk class and displays their values.

using System; 
using System.Management;
 
// This sample demonstrates how to 
// enumerate qualifiers of a ManagementClass 
// using QualifierDataEnumerator object.
class Sample_QualifierDataEnumerator 
{ 
    public static int Main(string[] args) 
    { 
        ManagementClass diskClass = 
            new ManagementClass("Win32_LogicalDisk"); 
        diskClass.Options.UseAmendedQualifiers = true; 
        QualifierDataCollection diskQualifier = 
            diskClass.Qualifiers;
        QualifierDataCollection.QualifierDataEnumerator 
            qualifierEnumerator = 
            diskQualifier.GetEnumerator();
        while(qualifierEnumerator.MoveNext()) 
        {
            Console.WriteLine(
                qualifierEnumerator.Current.Name + " = " +
                qualifierEnumerator.Current.Value);
        }
        return 0;
    }
}
Imports System
Imports System.Management

' This sample demonstrates how to
' enumerate qualifiers of a ManagementClass
' using QualifierDataEnumerator object.
Class Sample_QualifierDataEnumerator
    Public Overloads Shared Function _
        Main(ByVal args() As String) As Integer
        Dim diskClass As New _
            ManagementClass("win32_logicaldisk")
        diskClass.Options.UseAmendedQualifiers = True
        Dim diskQualifier As _
            QualifierDataCollection = diskClass.Qualifiers
        Dim qualifierEnumerator As _
            QualifierDataCollection.QualifierDataEnumerator = _
                diskQualifier.GetEnumerator()
        While qualifierEnumerator.MoveNext()
            Console.WriteLine( _
                qualifierEnumerator.Current.Name & _
                " = " & qualifierEnumerator.Current.Value)
        End While
        Return 0
    End Function
End Class

Propriedades

Current Current Current Current

Obtém ou define o QualifierData atual na enumeração QualifierDataCollection.Gets or sets the current QualifierData in the QualifierDataCollection enumeration.

Métodos

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determina se o objeto especificado é igual ao objeto atual.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serve como a função de hash padrão.Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Obtém o Type da instância atual.Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object.

(Inherited from Object)
MoveNext() MoveNext() MoveNext() MoveNext()

Vai para o próximo elemento na enumeração QualifierDataCollection.Moves to the next element in the QualifierDataCollection enumeration.

Reset() Reset() Reset() Reset()

Redefine o enumerador para o início da enumeração QualifierDataCollection.Resets the enumerator to the beginning of the QualifierDataCollection enumeration.

ToString() ToString() ToString() ToString()

Retorna uma cadeia de caracteres que representa o objeto atual.Returns a string that represents the current object.

(Inherited from Object)

Implantações explícitas de interface

IEnumerator.Current IEnumerator.Current IEnumerator.Current IEnumerator.Current

Obtém o objeto atual na coleção.Gets the current object in the collection.

Aplica-se a