Skip to main content Link Menu Expand (external link) Document Search Copy Copied

LinkedList(T val)

Constructs a list of length one with the first element containing the given value

Parameter

  • val - The value to put in the first element

Example

LinkedList<int> list = LinkedList<int>(3);

//list now contains one element, 3