Let’s locate a node and add elements prior to the node.
First find the node with the string fox.
LinkedListNode<string> current = sentence.Find("fox");
Next we add quick and brown before.
sentence.AddBefore(current, "big"); sentence.AddBefore(current, "brown");
Awesome! Now iterate over the LinkedList again and check the result.
Perfect! Now go out and make some LinkedLists, it’s free!