IVector<TValue>.assign 方法

定义

用指定元素替换容器中的所有元素。Replaces all elements in the container with the specified elements.

重载

assign(IEnumerable)

用指定枚举中的元素替换容器中的所有元素。Replaces all elements in the container with the elements in the specified enumeration.

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

用给定迭代器之间的元素替换容器中的所有元素。Replaces all elements in the container with the elements between the given iterators.

assign(Int32, TValue)

用指定数量的具有给定值的元素替换容器中的所有元素。Replaces all elements in the container with the specified number of elements that have given values.

注解

有关详细信息,请参阅vector:: assign (STL/CLR)For more information, see vector::assign (STL/CLR).

assign(IEnumerable)

用指定枚举中的元素替换容器中的所有元素。Replaces all elements in the container with the elements in the specified enumeration.

public:
 void assign(System::Collections::IEnumerable ^ _Right);
public void assign (System.Collections.IEnumerable _Right);
abstract member assign : System.Collections.IEnumerable -> unit
Public Sub assign (_Right As IEnumerable)

参数

_Right
IEnumerable

要将其元素插入到容器中的枚举。The enumeration whose elements are to be inserted into the container.

注解

有关详细信息,请参阅vector:: assign (STL/CLR)For more information, see vector::assign (STL/CLR).

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

用给定迭代器之间的元素替换容器中的所有元素。Replaces all elements in the container with the elements between the given iterators.

public:
 void assign(Microsoft::VisualC::StlClr::Generic::IInputIterator<TValue> ^ _First, Microsoft::VisualC::StlClr::Generic::IInputIterator<TValue> ^ _Last);
public void assign (Microsoft.VisualC.StlClr.Generic.IInputIterator<TValue> _First, Microsoft.VisualC.StlClr.Generic.IInputIterator<TValue> _Last);
abstract member assign : Microsoft.VisualC.StlClr.Generic.IInputIterator<'Value> * Microsoft.VisualC.StlClr.Generic.IInputIterator<'Value> -> unit
Public Sub assign (_First As IInputIterator(Of TValue), _Last As IInputIterator(Of TValue))

参数

_First
IInputIterator<TValue>

要插入的元素范围的开始位置。The beginning position of the range of elements to insert.

_Last
IInputIterator<TValue>

要插入的元素范围的末尾之外的第一个位置。The first position beyond the end of the range of elements to insert.

注解

有关详细信息,请参阅vector:: assign (STL/CLR)For more information, see vector::assign (STL/CLR).

assign(Int32, TValue)

用指定数量的具有给定值的元素替换容器中的所有元素。Replaces all elements in the container with the specified number of elements that have given values.

public:
 void assign(int _Count, TValue _Val);
public void assign (int _Count, TValue _Val);
abstract member assign : int * 'Value -> unit
Public Sub assign (_Count As Integer, _Val As TValue)

参数

_Count
Int32

要插入到容器中的元素数。The number of elements to insert into the container.

_Val
TValue

要插入的元素的值。The value of the element to insert.

注解

有关详细信息,请参阅vector:: assign (STL/CLR)For more information, see vector::assign (STL/CLR).

适用于