LinkedList<T>.Find(T) method is used to find the first node that contains the specified value.
public System.Collections.Generic.LinkedListNode<T> Find (T value);
Here, value is the value to locate in the LinkedList.
Return Value: This method returns the first 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 forward starting at First and ending at Last.
- This method performs a linear search. Therefore, this method is an O(n) operation, where n is Count.
- C# | Find the last 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 node at the end of LinkedList<T>
- C# | Removing the specified node from the LinkedList<T>
- C# | Removing the node at the start of the LinkedList<T>
- C# | Adding new node or value at the start of LinkedList<T>
- 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#
- How to find the length of the StringBuilder in C#
- How to find the Capacity of a StringBuilder in C#
- How to find the MaxCapacity of a StringBuilder in C#
- C# | Array.Find() Method
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.