Пример #1
0
        static void Main(string[] args)
        {
            sourceHandler s = new sourceHandler("C:/Users/Feri/file.txt", "C:/Users/Feri/file2.txt");

            s.openFileToRead();
            Console.WriteLine("text: " + s.content);
            s.replaceContent();
            s.replaceFirst();
            //s.replaceContent("... this is a text which we append the file with.");
            Console.WriteLine("new text: " + s.content);
            s.openFileToWrite();
            Console.WriteLine("done");
            Console.ReadLine();
        }
Пример #2
0
        static void Main(string[] args)
        {
            sourceHandler s = new sourceHandler(@"C:\Users\Norbi\Desktop\Forditprogamok\Forditoprogramok\bin\Debug\file1.txt", "file2.txt");

            s.openFileToRead();
            Console.WriteLine("Bemenet:");
            Console.WriteLine(s.Content);
            s.replaceContent();
            s.replaceFirst();
            Console.WriteLine("Kimenet:");
            Console.WriteLine(s.Content);
            s.openFileToWrite();
            Console.WriteLine("done");
            Console.ReadLine();
        }