IVector<T> Interface
表示元素的随机访问集合。
.NET: 此接口显示为 System.Collections.Generic.IList<T>。
语法
generic<typename T> public interface class IVector : IIterable<T>
特性
- GuidAttribute("913337e9-11a1-4345-a3a2-4e7f956e222d")
- VersionAttribute(NTDDI_WIN8)
类型参数
- T
-
矢量中值的类型。
成员
IVector接口 继承自 IIterable(T). IVector 还包括以下类型的成员:
方法
The IVector 接口 具有以下方法。 它还继承以下内容中的的方法 Object 类.
| 方法 | 描述 |
|---|---|
| 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. |
属性
该 IVector接口 具有以下属性。
| 属性 | 访问类型 | 描述 |
|---|---|---|
| 只读 | Gets the number of items in the vector. |
备注
使用 Microsoft .NET Framework 生成 Windows Store 应用程序时,此界面会隐藏,开发人员应使用 System.Collections.Generic.IList<T> 界面。
IVector<T> 表示指定类型的对象的集合,可以通过索引单独访问这些对象。IVector<T> 的属性和方法支持列表类型的功能,例如获取集合的大小以及添加和移除集合中指定位置的项。此外,GetView 方法提供其可观测状态不更改的矢量的快照。当您需要集合视图以引用涉及 IVector<T>的后续操作时,快照是非常有用的。
要求
|
最低受支持的客户端 | Windows 8 |
|---|---|
|
最低受支持的服务器 | Windows Server 2012 |
|
最低受支持的电话 | Windows Phone 8 |
|
命名空间 |
Windows::Foundation::Collections |
|
元数据 |
|
|
DLL |
|