begin Function

Returns an iterator that points to the beginning of a collection that is accessed by the specified interface parameter.


template <typename T>
    begin(IVector<T>^ v);

template <typename T>
    begin(IVectorView<T>^ v);

template <typename T>
    begin(IIterable<T>^ i);


A template type parameter.

A collection of Vector<T> or VectorView<T> objects that are accessed by an IVector<T> or IVectorView<T> interface.

A collection of arbitrary Windows Runtime objects that are accessed by an IIterable<T> interface.

Return value

An iterator that points to the beginning of the collection.


The first two function templates return iterators, and the third function template returns an input iterator.

The VectorIterator object that is returned by begin is a proxy iterator that stores elements of type VectorProxy<T>. However, the proxy object is almost never visible to user code. For more information, see Collections (C++/CX).


Header: collection.h

Namespace: Windows::Foundation::Collections

See also

Windows::Foundation::Collections namespace