Пример #1
0
        /// <summary>
        /// Removes the first item on the queue and returns it
        /// </summary>
        /// <returns>the removed item</returns>
        public T Dequeue()
        {
            var first = _theQueueList.First.Value;

            _theQueueList.RemoveFirst();
            return(first);
        }
Пример #2
0
        /// <summary>
        /// Removes the item at top of the stack and returns it
        /// </summary>
        /// <returns>The item removed</returns>
        public T Pop()
        {
            T toReturn = _theStackList.First.Value;

            _theStackList.RemoveFirst();

            return(toReturn);
        }