Represents a random-access collection of elements.
.NET: This interface appears as System.Collections.Generic.IList<T>.
Syntax
generic<typename T> public interface class IVector : IIterable<T>
Attributes
- GuidAttribute("913337e9-11a1-4345-a3a2-4e7f956e222d")
- VersionAttribute(NTDDI_WIN8)
Type parameters
- T
-
The type of the values in the vector.
Members
The IVector interface inherits from IIterable(T). IVector also has these types of members:
Methods
The IVector interface has these methods. It also inherits methods from the Object class.
| Method | Description |
|---|---|
| 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. |
Properties
The IVector interface has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the number of items in the vector. |
Remarks
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>.
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Minimum supported phone | Windows Phone 8 |
|
Namespace |
Windows::Foundation::Collections |
|
Metadata |
|
|
DLL |
|
Build date: 2/25/2013