Esempio n. 1
0
        public void thisSort()
        {
            StrList tmp = returnSort();

            for (int i = 0; i <= tmp.getEnd(); i++)
            {
                add(tmp.getAt(i));
            }
        }
Esempio n. 2
0
        private static void delName(string name, StrList names)
        {
            bool performed = false;
            int  endLoop   = names.getEnd();

            for (int i = 0; i <= endLoop; i++)
            {
                if (names.getAt(i) == name)
                {
                    names.delAt(i);
                    performed = true;
                    endLoop--;
                }
            }

            if (!performed)
            {
                Console.WriteLine("Name not found in the list.");
            }
            else
            {
                Console.WriteLine(name + " has been deleted from the list.");
            }
        }