public T Pull()
        {
            T data = this.Peek();

            head = head.Next;
            return(data);
        }
        public T Push(T NewElement)
        {
            StackElement <T> element = new StackElement <T>(NewElement);

            element.Next = head;
            head         = element;
            return(NewElement);
        }
Exemple #3
0
 public StackElement(T Data)
 {
     this.Data = Data;
     this.Next = null;
 }