Editare

Partajați prin


IVector<TValue>.assign Method

Definition

Replaces all elements in the container with the specified elements.

Overloads

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.

Remarks

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)

Parameters

_Right
IEnumerable

The enumeration whose elements are to be inserted into the container.

Remarks

For more information, see vector::assign (STL/CLR).

Applies to

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))

Parameters

_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.

Remarks

For more information, see vector::assign (STL/CLR).

Applies to

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)

Parameters

_Count
Int32

The number of elements to insert into the container.

_Val
TValue

The value of the element to insert.

Remarks

For more information, see vector::assign (STL/CLR).

Applies to