Tag Archives: CSharp-LinkedList

A LinkedList is a linear data structure which stores element in the non-contiguous location. The elements in a linked list are linked with each other… Read More
Equals(Object) Method which is inherited from the Object class is used to check if a specified LinkedList<T> object is equal to another LinkedList<T> object or… Read More
LinkedList<T>.GetEnumerator Method is used to get an enumerator that iterates through the LinkedList<T>. Syntax: public System.Collections.Generic.LinkedList<T>.Enumerator GetEnumerator (); Return Value: It returns an LinkedList<T>.Enumerator for… Read More
LinkedList<T> Class is present in System.Collections.Generic namespace. This generic type allows fast inserting and removing of elements. It implements a classic linked list. Each object… Read More
LinkedList<T>.First property is used to get the first node of the LinkedList<T>. Syntax: public System.Collections.Generic.LinkedListNode First { get; } Return Value: The first LinkedListNode<T> of… Read More
LinkedList<T>.Clear method is used to remove the all nodes from the LinkedList<T>. Syntax: public void Clear (); Below given are some examples to understand the… Read More
LinkedList<T>.RemoveFirst method is used to remove the node at the start of the LinkedList<T>. Syntax: public void RemoveFirst (); Exception: The method throws InvalidOperationException if… Read More
LinkedList<T>.RemoveLast method is used to remove the node at the end of the LinkedList<T>. Syntax: public void RemoveLast (); Exception: The method throws InvalidOperationException if… Read More
Remove(LinkedListNode<T>) method is used to remove the specified node from the LinkedList<T>. Syntax: public void Remove (System.Collections.Generic.LinkedListNode<T> node); Here, node is the LinkedListNode<T> to remove… Read More
Remove(T) method is used to remove the first occurrence of the specified value from the LinkedList<T>. Syntax: public bool Remove (T value); Here, value is… Read More
LinkedList<T>.Find(T) method is used to find the first node that contains the specified value. Syntax: public System.Collections.Generic.LinkedListNode<T> Find (T value); Here, value is the value… Read More
LinkedList<T>.FindLast(T) method is used to find the last node that contains the specified value. Syntax: public System.Collections.Generic.LinkedListNode<T> FindLast (T value); Here, value is the value… Read More
LinkedList<T>.AddFirst Method is used to add a new node or value at the starting of the LinkedList<T>. There are 2 methods in the overload list… Read More
LinkedList<T>.AddLast Method is used to add a new node or value at the end of the LinkedList<T>. There are 2 methods in the overload list… Read More
LinkedList<T>.Contains(T) method is used to check whether a value is in the LinkedList<T> or not. Syntax: public bool Contains (T value); Here, value is the… Read More