Επεξεργασία

Κοινή χρήση μέσω


IList<TValue>.assign Method

Definition

Replaces all elements of the container with the specified elements.

Overloads

assign(IEnumerable)

Replaces the controlled sequence with the sequence that is designated by the given enumerator.

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

Replaces the controlled sequence with the sequence [_First,_Last).

assign(Int32, TValue)

Replaces the controlled sequence with the specified number of the given element.

Remarks

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

assign(IEnumerable)

Replaces the controlled sequence with the sequence that is designated by the given enumerator.

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 list::assign (STL/CLR).

Applies to

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

Replaces the controlled sequence with the sequence [_First,_Last).

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 into the container.

_Last
IInputIterator<TValue>

The first position beyond the range of elements to insert into the container.

Remarks

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

Applies to

assign(Int32, TValue)

Replaces the controlled sequence with the specified number of the given element.

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 elements to insert into the container.

Remarks

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

Applies to