IIterator<T> IIterator<T> IIterator<T> IIterator<T> Interface

Supports simple iteration over a collection.

Syntax

Declaration

public interface IIterator<T>public interface IIterator<T>Public Interface IIterator<T>

Remarks

The IIterator<T> interface isn't explicitly hidden by the language projection for .NET, but the IIterable<T> interface is hidden. For most .NET scenarios that specifically require an API for the iterator object, you'll probably use IEnumerator<T> (perhaps with a specific type constraint) as obtained from calling IEnumerable<T>.GetEnumerator.

Properties summary

Gets the current item in the collection.

Gets a value that indicates whether the iterator refers to a current item or is at the end of the collection.

Methods summary

Retrieves all items in the collection.

Advances the iterator to the next item in the collection.

Properties

  • Current
    Current
    Current
    Current

    Gets the current item in the collection.

    public T Current { get; }public T Current { get; }Public ReadOnly Property Current As T

    Property Value

    • T
      T
      T
      T

      The current item in the collection.

  • HasCurrent
    HasCurrent
    HasCurrent
    HasCurrent

    Gets a value that indicates whether the iterator refers to a current item or is at the end of the collection.

    public bool HasCurrent { get; }public bool HasCurrent { get; }Public ReadOnly Property HasCurrent As bool

    Property Value

    • bool
      bool
      bool
      bool

      True if the iterator refers to a valid item in the collection; otherwise, false.

Methods

  • GetMany(T[])
    GetMany(T[])
    GetMany(T[])
    GetMany(T[])

    Retrieves all items in the collection.

    public uint GetMany(T[] items)public uint GetMany(T[] items)Public Function GetMany(items As T[]) As uint

    Parameters

    • items
      T[]
      T[]
      T[]
      T[]

      The items in the collection.

    Returns

    • uint
      uint
      uint
      uint

      The number of items in the collection.

  • MoveNext()
    MoveNext()
    MoveNext()
    MoveNext()

    Advances the iterator to the next item in the collection.

    public bool MoveNext()public bool MoveNext()Public Function MoveNext() As bool

    Returns

    • bool
      bool
      bool
      bool

      True if the iterator refers to a valid item in the collection; false if the iterator passes the end of the collection.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.FoundationContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.GuidAttribute

Details

Assembly

Windows.Foundation.Collections.dll