System.Collections by Microsoft

<PackageReference Include="System.Collections" Version="4.0.11-beta-23409" />

 LinkedList<T>

Represents a doubly linked list.

Enumerates the elements of a LinkedList<T>.

public int Count { get; }

Gets the number of nodes actually contained in the LinkedList<T>.

public LinkedListNode<T> First { get; }

Gets the first node of the LinkedList<T>.

public LinkedListNode<T> Last { get; }

Gets the last node of the LinkedList<T>.

public LinkedList()

Initializes a new instance of the LinkedList<T> class that is empty.

public LinkedList(IEnumerable<T> collection)

Initializes a new instance of the LinkedList<T> class that contains elements copied from the specified IEnumerable and has sufficient capacity to accommodate the number of elements copied.

public LinkedListNode<T> AddAfter(LinkedListNode<T> node, T value)

Adds a new node containing the specified value after the specified existing node in the LinkedList<T>.

public void AddAfter(LinkedListNode<T> node, LinkedListNode<T> newNode)

Adds the specified new node after the specified existing node in the LinkedList<T>.

public LinkedListNode<T> AddBefore(LinkedListNode<T> node, T value)

Adds a new node containing the specified value before the specified existing node in the LinkedList<T>.

public void AddBefore(LinkedListNode<T> node, LinkedListNode<T> newNode)

Adds the specified new node before the specified existing node in the LinkedList<T>.

public LinkedListNode<T> AddFirst(T value)

Adds a new node containing the specified value at the start of the LinkedList<T>.

public void AddFirst(LinkedListNode<T> node)

Adds the specified new node at the start of the LinkedList<T>.

public LinkedListNode<T> AddLast(T value)

Adds a new node containing the specified value at the end of the LinkedList<T>.

public void AddLast(LinkedListNode<T> node)

Adds the specified new node at the end of the LinkedList<T>.

public void Clear()

Removes all nodes from the LinkedList<T>.

public bool Contains(T value)

Determines whether a value is in the LinkedList<T>.

public void CopyTo(T[] array, int index)

Copies the entire LinkedList<T> to a compatible one-dimensional Array, starting at the specified index of the target array.

public LinkedListNode<T> Find(T value)

Finds the first node that contains the specified value.

public LinkedListNode<T> FindLast(T value)

Finds the last node that contains the specified value.

Returns an enumerator that iterates through the LinkedList<T>.

public bool Remove(T value)

Removes the first occurrence of the specified value from the LinkedList<T>.

public void Remove(LinkedListNode<T> node)

Removes the specified node from the LinkedList<T>.

public void RemoveFirst()

Removes the node at the start of the LinkedList<T>.

public void RemoveLast()

Removes the node at the end of the LinkedList<T>.