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