using System;
using System.Collections.Generic;
class Program {
static void Main() {
LinkedList<string> myList = new LinkedList<string>();
// Add 6 elements in the linked list
myList.AddLast("P");
myList.AddLast("Q");
myList.AddLast("R");
myList.AddLast("S");
myList.AddLast("T");
myList.AddLast("U");
LinkedListNode<string> node = myList.Find("R");
myList.AddAfter(node, "ADDED");
foreach (var i in myList) {
Console.WriteLine(i);
}
}
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/265928.html