VOOZH about

URL: https://www.geeksforgeeks.org/c-sharp/c-sharp-removing-the-specified-node-from-the-linkedlistt/

⇱ C# | Removing the specified node from the LinkedList<T> - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

C# | Removing the specified node from the LinkedList<T>

Last Updated : 11 Jul, 2025
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 from the LinkedList<T>. Exceptions:
  • ArgumentNullException : If the node is null.
  • InvalidOperationException : If the node is not in the current LinkedList<T>.
Below given are some examples to understand the implementation in a better way: Example 1: Output:
Total nodes in myList are : 4
2
4
6
8
Total nodes in myList are : 3
4
6
8
Example 2:
Comment

Explore