Windows Dev Center

GeometryCollection.GetMany method

Retrieves multiple elements in a single pass through the iterator.

Syntax


public:
unsigned int GetMany(
  unsigned int startIndex, 
  Array<Geometry^>^ items
)

Parameters

startIndex

Type: UInt32

The index from which to start retrieval.

items (out parameter)

Type: array of Geometry

Provides the destination for the result. Size the initial array size as a "capacity" in order to specify how many results should be retrieved.

Return value

Type: UInt32

The number of items retrieved.

Remarks

The GetMany method operates identically as if calling Current and MoveNext for each element in the supplied array. This means that the first element returned by the GetMany method is the same element as returned by retrieving the Current property prior to calling GetMany. After the GetMany call returns, the Current property will retrieve the element following the last element returned by the GetMany call, or produce an error if no more elements exist in the sequences.

The GetMany method returns the actual number of elements returned. It must be the minimum of a) the number of elements remaining in the collection, or b) the number of elements requested, that is, "capacity". Therefore, whenever GetMany returns less than the number of elements requested, the end of the sequence has been reached. It returns the number of elements retrieved in the "actual" output parameter. When the caller specifies a capacity of 0, the position of the iterator is unchanged. Elements in the array following the values returned are unchanged.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows::UI::Xaml::Media

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows::UI::Xaml::Media

Metadata

Windows.winmd

See also

GeometryCollection

 

 

Show:
© 2015 Microsoft