using system.collections.generic;
class Program
{
static void Main()
{
LinkedList
linked.AddFirst("111");
linked.AddFirst("222");
foreach (var item in linked)
{
console.writeLine(item);
}
}
}
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Apr 3, 2012, 12:29 AM EDT
using System;
using System.Collections.Generic;
class Program
{
static LinkedList
static void Main()
{
AddItems("111", "222");
PrintItems();
Console.ReadKey();
}
static void AddItems(params string[] items)
{
foreach(string item in items) linked.AddFirst(item);
}
static void PrintItems()
{
foreach (string item in linked) Console.WriteLine(item);
}
}
dany maor25 reputationPosted Apr 3, 2012, 1:48 AM EDT
I would love to another idea how to do it.
I'm now learning about it and I love to see and learn several types of ideas. Anyway I really thank you for your help