public object Pop() { StackElement element = _head; _head = _head.NextElement; element.NextElement = null; return element.Data; }
public void Push(object value) { StackElement element = new StackElement(); element.Data = value; element.NextElement = _head; _head = element; }