public void DeleteHead() { if (Head == null) { throw new Exception("Empty List!!!"); } Console.WriteLine("Deleting head"); Head = Head.Next; }
public void InsertAtHead(int data) { Console.WriteLine("Inserting " + data); var node = new NodeL() { Data = data }; if (Head == null) { Head = node; } else { node.Next = Head; Head = node; } }