IIterator<T>.GetMany(T[]) Method

Definition

Retrieves multiple items from the iterator.

C++/WinRT The correct syntax for the C++/WinRT language projection is uint32_t GetMany(winrt::array_view<T> items);.

public:
 unsigned int GetMany(Platform::Array <T> ^ items);
uint32_t GetMany(winrt::array_view <T> & items);
public uint GetMany(T[] items);
Public Function GetMany (items As T()) As UInteger

Parameters

items
T[]

An array that receives the items retrieved from the iterator.

C++/WinRT A winrt::array_view that receives the items retrieved from the iterator.

Returns

UInt32

unsigned int

uint32_t

The number of items that were retrieved. This value can be less than the size of items if the end of the iterator is reached.

Remarks

The iterator is advanced past the items that were retrieved.

C++/WinRT In addition to passing a winrt::array_view<T>, you can pass any object that's convertible to a winrt::array_view<T>, such as these examples.

  • C++ std::array<T, N>
  • C-style array of T
  • C++ std::vector<T>
  • { pointer, length }, where pointer is a pointer to a buffer of T objects, and length is the number of entries in the buffer
  • { first, last }, where first and last represent a range of T objects [first, last)

If the underlying collection has changed, the iterator may throw an exception.

.NET Framework If the underlying collection has changed, the iterator may throw a COMException exception with an HResult of 0x8000000C (E_CHANGED_STATE).

C++/WinRT If the underlying collection has changed, the iterator may throw a hresult_changed_state exception.

C++/CX If the underlying collection has changed, the iterator may throw a ChangedStateException exception.

Applies to

See also