How do I divide this function of a linked list for 2 functions One to put data and one to print them???
using system;
using system.collections.generic;
class Program
{
static void Main()
{
LinkedList<string> linked = new LinkedList<string>();
linked.AddFirst("111");
linked.AddFirst("222");
foreach (var item in linked)
{
console.writeLine(item);
}
}
}