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.
Supports simple iteration over a collection.
public interface class IIterator
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.FoundationContract, 65536)] /// [Windows.Foundation.Metadata.Guid(1786374243, 17152, 17818, 153, 102, 203, 182, 96, 150, 62, 225)] template <typename T> struct IIterator
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.FoundationContract), 65536)] [Windows.Foundation.Metadata.Guid(1786374243, 17152, 17818, 153, 102, 203, 182, 96, 150, 62, 225)] public interface IIterator<T>
Public Interface IIterator(Of T)
Windows 10 (introduced in 10.0.10240.0)
Windows.Foundation.FoundationContract (introduced in v1.0)
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.
If changes are made to the collection, such as adding, modifying, or deleting elements, the iterator is permitted to raise an exception for all operations.
C++/WinRT extension functions
Extension functions exist on the C++/WinRT projection types for certain Windows Runtime APIs. For example, winrt::Windows::Foundation::IAsyncAction is the C++/WinRT projection type for IAsyncAction. The extension functions aren't part of the application binary interface (ABI) surface of the actual Windows Runtime types, so they're not listed as members of the Windows Runtime APIs. But you can call them from within any C++/WinRT project. See C++/WinRT functions that extend Windows Runtime APIs.
These operators permit ranged-for loops over Windows Runtime iterable objects. The prefix and postfix
++ operator advances the iterator, and sets it to
nullptr if the iterator has completed.
T operator*() const;
Dereferencing the iterator is equivalent to calling Current.
using iterator_concept= std::input_iterator_tag; using iterator_catetory = std::input_iterator_tag; using value_type = T; using difference_type = ptrdiff_t; using pointer = void; using reference = T;
Nested types that improve interoperability with C++ iterators.
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.
Retrieves multiple items from the iterator.
Advances the iterator to the next item in the collection.