示例#1
0
        public T Pull()
        {
            T data = this.Peek();

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

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