IVectorView<T>.GetMany(UInt32, T[]) Method

Definition

Retrieves multiple items from the vector view beginning at the given index.

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

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

Parameters

startIndex
UInt32

unsigned int

uint32_t

The zero-based index to start at.

items
T[]

An array that receives the items copied from the vector view.

C++/WinRT A winrt::array_view that receives the items copied from the vector view.

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 vector is reached.

Remarks

When programming with .NET, this interface is hidden. Use the IList interface instead.

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 start index is greater than the size of the collection, the view will throw an exception.

C++/WinRT If the start index is greater than or equal to the size of the collection, the view will throw a hresult_out_of_bounds exception.

C++/CX If the start index is greater than or equal to the size of the collection, the view will throw a OutOfBoundsException exception.

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

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

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

Applies to