IList<TValue> IList<TValue> IList<TValue> IList<TValue> Interface

定义

定义 STL/CLR list 对象的接口。Defines the interface for an STL/CLR list object.

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 元素的类型。The type of a list element.

实现

注解

有些方法(尤其是运算符)声明参数的类型,但不指定参数名称。Some methods, especially operators, declare a type for a parameter but do not specify a parameter name. 此类参数称为“未命名参数” 。Such a parameter is known as an unnamed parameter. 在这些方法的文档中,__unnamed0 占位符表示未命名参数。In the documentation for these methods, the __unnamed0 placeholder represents the unnamed parameter.

属性

back_item back_item back_item back_item

访问容器的最后一个元素。Accesses the last element of the container.

Count Count Count Count

获取 ICollection 中包含的元素数。Gets the number of elements contained in the ICollection.

(Inherited from ICollection)
front_item front_item front_item front_item

访问容器的第一个元素。Accesses the first element of the container.

IsSynchronized IsSynchronized IsSynchronized IsSynchronized

获取一个值,该值指示是否同步对 ICollection 的访问(线程安全)。Gets a value indicating whether access to the ICollection is synchronized (thread safe).

(Inherited from ICollection)
SyncRoot SyncRoot SyncRoot SyncRoot

获取可用于同步对 ICollection 的访问的对象。Gets an object that can be used to synchronize access to the ICollection.

(Inherited from ICollection)

方法

assign(IEnumerable) assign(IEnumerable) assign(IEnumerable) assign(IEnumerable)

用给定枚举器指定的序列替换受控序列。Replaces the controlled sequence with the sequence that is designated by the given enumerator.

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

用序列 [_First,_Last) 替换受控序列。Replaces the controlled sequence with the sequence [_First,_Last).

assign(Int32, TValue) assign(Int32, TValue) assign(Int32, TValue) assign(Int32, TValue)

用指定数量的给定元素替换受控序列。Replaces the controlled sequence with the specified number of the given element.

back() back() back() back()

访问容器的最后一个元素。Accesses the last element of the container.

begin(ContainerBidirectionalIterator<TValue>) begin(ContainerBidirectionalIterator<TValue>) begin(ContainerBidirectionalIterator<TValue>) begin(ContainerBidirectionalIterator<TValue>)

指定受控序列的开头。Designates the beginning of the controlled sequence.

clear() clear() clear() clear()

从容器中移除所有元素。Removes all elements from the container.

Clone() Clone() Clone() Clone()

创建作为当前实例副本的新对象。Creates a new object that is a copy of the current instance.

(Inherited from ICloneable)
CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32)

从特定的 ICollection 索引开始,将 Array 的元素复制到一个 Array 中。Copies the elements of the ICollection to an Array, starting at a particular Array index.

(Inherited from ICollection)
empty() empty() empty() empty()

测试容器中是否没有元素。Tests whether the container has no elements.

end(ContainerBidirectionalIterator<TValue>) end(ContainerBidirectionalIterator<TValue>) end(ContainerBidirectionalIterator<TValue>) end(ContainerBidirectionalIterator<TValue>)

指定受控序列的末尾。Designates the end of the controlled sequence.

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

移除受控序列中由给定迭代器指向的单个元素。Removes the single element of the controlled sequence pointed to by the given iterator.

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

删除 [_First_iter, _Last_iter] 范围内受控序列的元素。Removes the elements of the controlled sequence in the range [_First_iter, _Last_iter).

front() front() front() front()

访问容器的第一个元素。Accesses the first element of the container.

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

返回循环访问集合的枚举数。Returns an enumerator that iterates through a collection.

(Inherited from IEnumerable)
get_generation() get_generation() get_generation() get_generation()

获取基础容器的当前换代。Gets the current change generation of the underlying container.

(Inherited from IBidirectionalContainer<TValue>)
insert(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, TValue) insert(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, TValue) insert(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, TValue) insert(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, TValue)

将具有给定值的元素插入到容器中。Inserts an element of the given value into the container.

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

将指定枚举器的元素插入到容器中。Inserts the elements of the specified enumerator into the container.

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

将序列 [_First, _Last) 插入到容器中。Inserts the sequence [_First, _Last) into the container.

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

将具有给定值的元素插入到容器中。Inserts an element of the given value into the container.

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

合并两个有序受控序列。Merges two ordered controlled sequences.

pop_back() pop_back() pop_back() pop_back()

从容器中移除最后一个元素。Removes the last element from the container.

pop_front() pop_front() pop_front() pop_front()

从容器中移除第一个元素。Removes the first element from the container.

push_back(TValue) push_back(TValue) push_back(TValue) push_back(TValue)

将一个新元素添加到容器的末尾。Adds a new element to the end of the container.

push_front(TValue) push_front(TValue) push_front(TValue) push_front(TValue)

将一个新元素添加到容器的开头。Adds a new element to the beginning of the container.

rbegin(ReverseBidirectionalIterator<TValue>) rbegin(ReverseBidirectionalIterator<TValue>) rbegin(ReverseBidirectionalIterator<TValue>) rbegin(ReverseBidirectionalIterator<TValue>)

指定反向受控序列的开头。Designates the beginning of the reversed controlled sequence.

remove(TValue) remove(TValue) remove(TValue) remove(TValue)

从容器中移除具有指定值的元素。Removes an element that has a specified value from the container.

remove_if(UnaryDelegate<TValue,Boolean>) remove_if(UnaryDelegate<TValue,Boolean>) remove_if(UnaryDelegate<TValue,Boolean>) remove_if(UnaryDelegate<TValue,Boolean>)

从容器中移除通过指定测试的元素。Removes elements from the container that pass a specified test.

rend(ReverseBidirectionalIterator<TValue>) rend(ReverseBidirectionalIterator<TValue>) rend(ReverseBidirectionalIterator<TValue>) rend(ReverseBidirectionalIterator<TValue>)

指定反向受控序列的末尾。Designates the end of the reversed controlled sequence.

resize(Int32) resize(Int32) resize(Int32) resize(Int32)

将容器中的元素数更改为指定大小。Changes the number of elements in the container to the specified size.

resize(Int32, TValue) resize(Int32, TValue) resize(Int32, TValue) resize(Int32, TValue)

将容器中的元素数更改为指定大小。Changes the number of elements in the container to the specified size. 如果新大小大于旧大小,则将给定值追加到容器中。If the new size is larger than the old size, the given values will be appended to the container.

reverse() reverse() reverse() reverse()

反转受控序列的元素。Reverses the elements of the controlled sequence.

size() size() size() size()

计算容器中的元素数。Counts the number of elements in the container.

sort(BinaryDelegate<TValue,TValue,Boolean>) sort(BinaryDelegate<TValue,TValue,Boolean>) sort(BinaryDelegate<TValue,TValue,Boolean>) sort(BinaryDelegate<TValue,TValue,Boolean>)

对受控序列进行排序。Orders the controlled sequence.

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

将给定序列插入到容器中的指定位置前。Inserts the given sequence into the container before the specified position.

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

从给定的容器中移除由 _First 指向的元素并将该元素插入到受控序列中由 _Where 指向的元素之前。Removes the element from the given container pointed to by _First and inserts it before the element in the controlled sequence pointed to by _Where.

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

从给定的容器中移除元素范围 [_First, _Last) 并将其插入到受控序列中由 _Where 指向的元素之前。Removes the range of elements [_First, _Last) from the given container and inserts it before the element in the controlled sequence pointed to by _Where.

swap(IList<TValue>) swap(IList<TValue>) swap(IList<TValue>) swap(IList<TValue>)

交换两个容器的内容。Swaps the contents of two containers.

unique(BinaryDelegate<TValue,TValue,Boolean>) unique(BinaryDelegate<TValue,TValue,Boolean>) unique(BinaryDelegate<TValue,TValue,Boolean>) unique(BinaryDelegate<TValue,TValue,Boolean>)

删除通过了指定测试的相邻元素。Removes adjacent elements that pass a specified test.

扩展方法

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

适用于