Exemple #1
0
    public object Pop()
    {
        object it = this.head.it;

        this.head = this.head.next;
        --this.count;
        return(it);
    }
Exemple #2
0
 private void Add0(ObjectList.Link a)
 {
     if (this.head == null)
     {
         this.head = this.last = a;
     }
     else
     {
         this.last = this.last.next = a;
     }
 }
Exemple #3
0
 private object Get0(ObjectList.Link a, int x)
 {
     if (a == null || x < 0)
     {
         return((object)null);
     }
     if (x == 0)
     {
         return(a.it);
     }
     return(this.Get0(a.next, x - 1));
 }
Exemple #4
0
 internal Link(object o, ObjectList.Link x)
 {
     this.it   = o;
     this.next = x;
 }
Exemple #5
0
 public void Push(object o)
 {
     this.head = new ObjectList.Link(o, this.head);
     ++this.count;
 }
Exemple #6
0
 public void Reset()
 {
     this.cur = (ObjectList.Link)null;
 }
Exemple #7
0
 public bool MoveNext()
 {
     this.cur = this.cur != null ? this.cur.next : this.list.head;
     return(this.cur != null);
 }