public T Dequeue()
 {
     if (!_list.IsEmpty())
     {
         T tr = _list.First();
         _list.RemoveFirst();
         return(tr);
     }
     throw new Exception("LinkedQueue is Empty");
 }
Exemple #2
0
 public T Peek() => !_list.IsEmpty() ? _list.Last() : throw new Exception("LinkedStack is empty");