Than Ice

Than Ice

  • NA
  • 5
  • 654

Streamwriter output doesnt work Any Idea?

Dec 22 2015 12:22 AM
public void EditorialResponse(string filename, string word, string replace, string newfile)
{
StreamReader reader = new StreamReader("C\\:MyFile\\Story");
string input = reader.ReadToEnd();
using (StreamWriter writer = new StreamWriter("C\\:MyFile\\Story1", true)
{
string output = input.Replace("lol", "lel");
writer.Write(output);
writer.Close();
}
}

Answers (4)