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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
dany maorPosted Apr 3, 2012, 5:48 AM
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
VulpesPosted Apr 3, 2012, 4:29 AM
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);
}
}