Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            NameReader          reader             = new NameReader();
            string              lab10DirectoryPath = Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()));
            LinkedList <string> names = reader.ReadNamesFrom(lab10DirectoryPath + "\\nameList.txt");

            foreach (string name in names)
            {
                System.Console.WriteLine(name);
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            var           nameReader = new NameReader("NamesForExercise.txt");
            List <string> nameList   = nameReader.ReadNames();

            Console.WriteLine("List of names:");
            Console.WriteLine();
            foreach (var name in nameList)
            {
                Console.WriteLine(name);
            }
        }