Mid Collections

How do you iterate through a LinkedList<T>?

Use a foreach loop to traverse the linked list from start to end.

foreach (var num in numbers)

Console.WriteLine(num);

More from C# Programming Tutorial

All questions for this course