xxxxxxxxxx
using System;
using System.Collections.Generic;
class Program
{
static void Main(string[] args)
{
// Create a new LinkedList
LinkedList<string> linkedList = new LinkedList<string>();
// Add elements to the LinkedList
linkedList.AddLast("Apple");
linkedList.AddLast("Banana");
linkedList.AddLast("Cherry");
// Iterate over the elements in the LinkedList
foreach (var item in linkedList)
{
Console.WriteLine(item);
}
}
}