public void Push(object current) { Node temp = new Node(); temp.SetData(current); temp.SetNext(top); top = temp; }
public void Enqueue(object current) { Node temp = new Node(); temp.SetData(current); if (last == null) { first = temp; last = first; } else { last.SetNext(temp); } size++; }