Using LinkedLists in a .NET console application Part 2 – Add and remove nodes

Now it’s time to add a new word to the beginning of the list.


If you iterate over the list again you will see that today is added as the first element in the linked list.

Now let’s create a LinkedListnode containing the node we just created, remove it from the beginning and add it last.

In the next post we’ll search the node and add elements to it.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: