Example #1
0
        /// <summary>
        /// Returns an array of all items.
        /// </summary>
        /// <returns>Items Array</returns>
        public Items[] GetAllItemsFuckingCunt()
        {
            Items[] tempItemsArray = new Items[Size()];
            Node    current        = head.GetNext();
            int     count          = 0;

            while (current != null)
            {
                tempItemsArray[count] = current.GetItems();
                current = current.GetNext();
                count++;
            }
            return(tempItemsArray);
        }
Example #2
0
        /// <summary>
        /// Gets item by index???
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        public Items GetSingleItem(int index)
        {
            Node current = head.GetNext();

            for (int i = 1; i < index; i++)
            {
                if (current.GetNext() == null)
                {
                    return(null);
                }
                current = current.GetNext();
                break;
            }
            return(current.GetItems());
        }
Example #3
0
        /// <summary>
        /// Returns item at index.
        /// </summary>
        /// <param name="index">Index</param>
        /// <returns></returns>
        public Items Get(int index)
        {
            if (index <= 0)
            {
                return(null);
            }

            Node current = head.GetNext();

            for (int i = 1; i < index; i++)
            {
                if (current.GetNext() == null)
                {
                    return(null);
                }
                current = current.GetNext();
            }
            return(current.GetItems());
        }