Export (0) Print
Expand All
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IVector<T> interface

Applies to Windows and Windows Phone

Represents a random-access collection of elements.

.NET:  This interface appears as System.Collections.Generic.IList<T>.


generic<typename T>
public interface class IVector : IIterable<T>



Type parameters


The type of the values in the vector.


The IVector interface inherits from IIterable(T). IVector also has these types of members:


The IVector interface has these methods. It also inherits methods from the Object class.

Append Appends an item to the end of the vector.
Clear Removes all items from the vector.
GetAt Returns the item at the specified index in the vector.
GetMany Retrieves the items that start at the specified index in the vector.
GetView Returns an immutable view of the vector.
IndexOf Retrieves the index of a specified item in the vector.
InsertAt Inserts an item at a specified index in the vector.
RemoveAt Removes the item at the specified index in the vector.
RemoveAtEnd Removes the last item from the vector.
ReplaceAll Replaces all the items in the vector with the specified items.
SetAt Sets the value at the specified index in the vector.



The IVector interface has these properties.

PropertyAccess typeDescription


Read-onlyGets the number of items in the vector.



When building Windows Store apps with the Microsoft .NET Framework, this interface is hidden and developers should use the System.Collections.Generic.IList<T> interface.

The IVector<T> interface represents a collection of objects of a specified type that can be individually accessed by index. Properties and methods of IVector<T> support list-type functionality, such as getting the size of the collection, and adding and removing items at specified locations in the collection. Additionally, the GetView method provides a snapshot of the vector whose observable state does not change. The snapshot is useful when you need a view of the collection to refer to in subsequent operations that involve IVector<T>.

Interface inheritance

IVector inherits IIterable. Types that implement IVector also implement the interface members of IIterable.


Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8





See also

Collections (C++/CX)



© 2015 Microsoft