xtd 0.2.0
Loading...
Searching...
No Matches

◆ insert() [6/6]

template<typename type_t , typename allocator_t = xtd::collections::generic::helpers::allocator<typename std::conditional<std::is_same<bool, type_t>::value, char, type_t>::type>>
void xtd::collections::generic::list< type_t, allocator_t >::insert ( size_type  index,
const type_t &  value 
)
inlineoverridevirtual

Inserts an element into the xtd::collections::generic::list <type_t> at the specified index.

Parameters
indexThe zero-based index at which the new element should be inserted.
valueThe element should be inserted into the xtd::collections::generic::list <type_t>.
Exceptions
xtd::argument_out_of_range_exceptionindex is is greater than xtd::collections::generic::list::count.
Remarks
xtd::collections::generic::list <type_t> allows duplicate elements.

Implements xtd::collections::generic::ilist< type_t >.