/// <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); }
/// <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()); }
/// <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()); }