コード例 #1
0
ファイル: InclassStack.cs プロジェクト: jschollitt/6426-1822
        public int Pop()
        {
            InclassNode temp = this.top;

            this.top = this.top.next;
            this.count--;
            return(temp.value);
        }
コード例 #2
0
ファイル: InclassStack.cs プロジェクト: jschollitt/6426-1822
        public void Push(int value)
        {
            InclassNode newNode = new InclassNode(value);

            newNode.next = this.top;
            this.top     = newNode;
            this.count++;
        }
コード例 #3
0
ファイル: InclassStack.cs プロジェクト: jschollitt/6426-1822
 public InclassStack(int value)
 {
     this.top = new InclassNode(value);
     this.count++;
 }
コード例 #4
0
ファイル: InclassStack.cs プロジェクト: jschollitt/6426-1822
 public InclassStack()
 {
     this.top   = null;
     this.count = 0;
 }
コード例 #5
0
ファイル: InclassStack.cs プロジェクト: jschollitt/6426-1822
 public InclassNode(int value)
 {
     this.next  = null;
     this.value = value;
 }
コード例 #6
0
ファイル: InclassStack.cs プロジェクト: jschollitt/6426-1822
 public InclassNode()
 {
     this.next  = null;
     this.value = 0;
 }