LinkedList<T>.FindLast(T) method is used to find the last node that contains the specified value.
public System.Collections.Generic.LinkedListNode<T> FindLast (T value);
Here, value is the value to locate in the LinkedList.
Return Value: This method returns the last LinkedListNode<T> that contains the specified value, if found, otherwise, null.
Below given are some examples to understand the implementation in a better way:
System.NullReferenceException: Object reference not set to an instance of an object
- The LinkedList is searched backward starting at Last and ending at First.
- This method performs a linear search. Therefore, this method is an O(n) operation, where n is Count.
- C# | Find the first node in LinkedList<T> containing the specified value
- C# | Get the last node of the LinkedList<T>
- C# | Get the first node of the LinkedList<T>
- C# | Adding new node or value at the end of LinkedList<T>
- C# | Removing the specified node from the LinkedList<T>
- C# | Removing the node at the end of LinkedList<T>
- C# | Adding new node or value at the start of LinkedList<T>
- C# | Removing the node at the start of the LinkedList<T>
- C# | Array.Find() Method
- How to find the MaxCapacity of a StringBuilder in C#
- How to find the length of the StringBuilder in C#
- How to find the Capacity of a StringBuilder in C#
- LINQ | How to find the sum of the given Sequence?
- How to find the rank of an array in C#
- How to find the length of an Array in C#
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.