Пример #1
0
        /// <summary>
        ///   Moves to the next element in the bag.
        /// </summary>
        /// <returns>Returns whether the bag still holds items afterwards.</returns>
        public bool MoveNext()
        {
            if (!sourceBag.IsEmpty)
            {
                Current = sourceBag.PickAndDrop();
                return(true);
            }

            Current = default;
            return(false);
        }