public void Enqueue(T value) { var node = new QueueNode <T>(value) { NextNode = this.lastNode }; if (this.Count == 0) { this.lastNode = this.firstNode = node; } else if (this.Count == 1) { this.firstNode.NextNode = node; this.lastNode = node; } else { this.lastNode.NextNode = node; this.lastNode = node; } this.Count++; }
public LinkedQueue() { this._headNode = null; this._tailNode = null; this.Count = 0; }
public LinkedQueue() { head = null; tail = null; Count = 0; }
// Конструктор public LinkedQueue() { this.head = null; this.tail = null; this.Count = 0; }
public QueueNode(T value, QueueNode <T> PrevNode = null) { this.Value = value; this.PrevNode = PrevNode; }