Пример #1
0
        static void Main(string[] args)
        {
            string filePath     = @"C:\Users\mammu\samples";
            string fileName     = @"WishList.txt";
            string fullFilePath = Path.Combine(filePath, fileName);

            string[] linesFromfile = File.ReadAllLines(fullFilePath);
            WishList myWishes      = new WishList();

            foreach (string line in linesFromfile)
            {
                string[] tempArray  = line.Split(new char[] { '.' }, StringSplitOptions.RemoveEmptyEntries);
                string   PersonName = tempArray[1];
                string   PersonWish = tempArray[2];
                Console.WriteLine(WishList);

                myWishes.AddWishesToList(PersonName, PersonWish);
            }
        }