IList<TValue> 接口

定义

定义 STL/CLR list 对象的接口。

generic <typename TValue>
public interface class IList : ICloneable, Microsoft::VisualC::StlClr::Generic::IBidirectionalContainer<TValue>, System::Collections::ICollection
public interface IList<TValue> : ICloneable, Microsoft.VisualC.StlClr.Generic.IBidirectionalContainer<TValue>, System.Collections.ICollection
type IList<'Value> = interface
    interface IBidirectionalContainer<'Value>
    interface ICloneable
    interface ICollection
    interface IEnumerable
Public Interface IList(Of TValue)
Implements IBidirectionalContainer(Of TValue), ICloneable, ICollection

类型参数

TValue

list 元素的类型。

实现

注解

有些方法(尤其是运算符)声明参数的类型,但不指定参数名称。 此类参数称为“未命名参数”。 在这些方法的文档中, A_0 占位符表示未命名的参数。

属性

back_item

访问容器的最后一个元素。

Count

获取 ICollection 中包含的元素数。

(继承自 ICollection)
front_item

访问容器的第一个元素。

IsSynchronized

获取一个值,该值指示是否同步对 ICollection 的访问(线程安全)。

(继承自 ICollection)
SyncRoot

获取可用于同步对 ICollection 的访问的对象。

(继承自 ICollection)

方法

assign(IEnumerable)

用给定枚举器指定的序列替换受控序列。

assign(IInputIterator<TValue>, IInputIterator<TValue>)

将受控序列替换为序列 [)_First,_Last

assign(Int32, TValue)

用指定数量的给定元素替换受控序列。

back()

访问容器的最后一个元素。

begin(ContainerBidirectionalIterator<TValue>)

指定受控序列的开头。

clear()

从容器中移除所有元素。

Clone()

创建作为当前实例副本的新对象。

(继承自 ICloneable)
CopyTo(Array, Int32)

从特定的 ICollection 索引开始,将 Array 的元素复制到一个 Array 中。

(继承自 ICollection)
empty()

测试容器中是否没有元素。

end(ContainerBidirectionalIterator<TValue>)

指定受控序列的末尾。

erase(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>)

移除受控序列中由给定迭代器指向的单个元素。

erase(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>)

删除范围 [_First_iter_Last_iter) 中受控序列的元素。

front()

访问容器的第一个元素。

get_generation()

获取基础容器的当前换代。

(继承自 IBidirectionalContainer<TValue>)
GetEnumerator()

返回循环访问集合的枚举数。

(继承自 IEnumerable)
insert(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, TValue)

将具有给定值的元素插入到容器中。

insert(ContainerBidirectionalIterator<TValue>, IEnumerable)

将指定枚举器的元素插入到容器中。

insert(ContainerBidirectionalIterator<TValue>, IInputIterator<TValue>, IInputIterator<TValue>)

将序列 [_First, _Last) 插入到容器中。

insert(ContainerBidirectionalIterator<TValue>, Int32, TValue)

将具有给定值的元素插入到容器中。

merge(IList<TValue>, BinaryDelegate<TValue,TValue,Boolean>)

合并两个有序受控序列。

pop_back()

从容器中移除最后一个元素。

pop_front()

从容器中移除第一个元素。

push_back(TValue)

将一个新元素添加到容器的末尾。

push_front(TValue)

将一个新元素添加到容器的开头。

rbegin(ReverseBidirectionalIterator<TValue>)

指定反向受控序列的开头。

remove(TValue)

从容器中移除具有指定值的元素。

remove_if(UnaryDelegate<TValue,Boolean>)

从容器中移除通过指定测试的元素。

rend(ReverseBidirectionalIterator<TValue>)

指定反向受控序列的末尾。

resize(Int32)

将容器中的元素数更改为指定大小。

resize(Int32, TValue)

将容器中的元素数更改为指定大小。 如果新大小大于旧大小,则将给定值追加到容器中。

reverse()

反转受控序列的元素。

size()

计算容器中的元素数。

sort(BinaryDelegate<TValue,TValue,Boolean>)

对受控序列进行排序。

splice(ContainerBidirectionalIterator<TValue>, IList<TValue>)

将给定序列插入到容器中的指定位置前。

splice(ContainerBidirectionalIterator<TValue>, IList<TValue>, ContainerBidirectionalIterator<TValue>)

从给定的容器中移除由 _First 指向的元素并将该元素插入到受控序列中由 _Where 指向的元素之前。

splice(ContainerBidirectionalIterator<TValue>, IList<TValue>, ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>)

从给定的容器中移除元素范围 [_First, _Last) 并将其插入到受控序列中由 _Where 指向的元素之前。

swap(IList<TValue>)

交换两个容器的内容。

unique(BinaryDelegate<TValue,TValue,Boolean>)

删除通过了指定测试的相邻元素。

扩展方法

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。

AsParallel(IEnumerable)

启用查询的并行化。

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryable

适用于