List.add

Adds the specified item to the end of the list.

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

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

Parameters

elem
Type: T

element to add to the list

Meta