Step 7: Print all elements of the doubly linked list
To print all elements of the list is simple, you need to traverse through the list and output the data of each element.
//Print all items of the doubly Linked List
public void printlist()
Console.WriteLine("All items in the list:");
for (t = pfirst; t != null; t = t.next)
else Console.WriteLine("No item found!");
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: