Esempio n. 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("This is task 2");
            LoadBook loadBook = new LoadBook();

            FindAndReplaceManager.FindNext(loadBook);
            Console.ReadKey();
        }
Esempio n. 2
0
        public static void FindNext(LoadBook book)
        {
            var lVar = book.StreamReaderBook;

            while (!lVar.EndOfStream)
            {
                string line = lVar.ReadLine();
                if (line.StartsWith(partOfText))
                {
                    Console.WriteLine(line);
                    foreach (var lines in lVar.ReadToEnd())
                    {
                        Console.Write(lines);
                    }
                    break;
                }
            }
            book.StreamReaderBook.Close();
        }