List.add

Adds the specified item to the list to the specified index.

This function could cause a memory reallocation if the capacity of the list is not sufficient to contain the item to be added or index <= length of the list.

  1. void add(T elem)
  2. void add(size_t index, T elem)
    interface List(T)
    void
    add
    @nogc
    (
    size_t index
    ,
    )

Parameters

index
Type: size_t

index in which to place the element

elem
Type: T

element to add to the list

Meta