Using LinkedLists in a .NET console application Part 1 – Create the LinkedList

Let’s create and use a LinkedList which you can learn from here.

First create the LinkedList from a string array.

string[] words = new string[] { "the", "fox", "jumps", "over", "the", "dog" } ;
LinkedList<string> sentence = new LinkedList<string> (words);

Now iterate over the linkedlist to see the elements

Great! Now in the next post we’ll add and remove some nodes.

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: