Beispiel #1
0
        public CustomLinkedList <T> Find(Func <T, bool> where)
        {
            var outputList = new CustomLinkedList <T>();
            var current    = First;

            while (current != null)
            {
                if (where.Invoke(current.value))
                {
                    outputList.Add(current.value);
                }
                current = current.Next;
            }

            return(outputList);
        }
Beispiel #2
0
        public static CustomLinkedList <int> CreateList()
        {
            var list = new CustomLinkedList <int>();

            list.Add(1);
            list.Add(2);
            list.Add(3);
            list.Add(4);
            list.Add(5);
            list.Add(6);
            return(list);
        }