Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- using System.Text;
- class ReplaceSubstringsInFile
- {
- static void Main()
- {
- StreamReader inputFile = new StreamReader("../../Input.txt");
- StreamWriter outputFile = new StreamWriter("../../Output.txt");
- using (inputFile)
- {
- using (outputFile)
- {
- string fileContent = inputFile.ReadToEnd();
- inputFile.Close();
- StringBuilder content = new StringBuilder(fileContent);
- content.Replace("start", "finish");
- outputFile.WriteLine(content);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement