Share via


ReadOnlyLinkedElementCollection<T>.Enumerator Structure

Provides an enumerator over a ReadOnlyLinkedElementCollection

Namespace:  Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.11.0.dll)

Syntax

'Declaration
Public Structure Enumerator _
    Implements IEnumerator(Of T), IDisposable, IEnumerator
public struct Enumerator : IEnumerator<T>, 
    IDisposable, IEnumerator
public value class Enumerator : IEnumerator<T>, 
    IDisposable, IEnumerator
[<Sealed>]
type Enumerator =  
    struct 
        interface IEnumerator<'T>
        interface IDisposable 
        interface IEnumerator 
    end
JScript supports the use of structures, but not the declaration of new ones.

The ReadOnlyLinkedElementCollection<T>.Enumerator generic type exposes the following members.

Properties

  Name Description
Public property Current Gets currently selected role player.

Top

Methods

  Name Description
Public method Equals Indicates whether this instance and a specified object are equal. (Inherited from ValueType.)
Public method GetHashCode Returns the hash code for this instance. (Inherited from ValueType.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method MoveNext Moves to the next role player in collection. Returns false if there is no next role player.
Public method Reset Moves enumerator to the beginning of collection.
Public method ToString Returns the fully qualified type name of this instance. (Inherited from ValueType.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate property IEnumerator.Current
Explicit interface implemetationPrivate method IDisposable.Dispose Releases all resources used by the current instance of the ReadOnlyLinkedElementCollection<T>.Enumerator class.

Top

Remarks

The foreach statement of the C# language (For Each in Visual Basic) hides the complexity of enumerators. Therefore, using foreach is recommended, instead of directly manipulating the enumerator.

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.

See Also

Reference

Microsoft.VisualStudio.Modeling Namespace