title: Remove Stop Words From text File
body: <p>i want to remove stop words from my text file and i write the following code for this purpose    </p>
  
  <pre><code> TextWriter tw = new StreamWriter("D:\\output.txt");
   private void button1_Click(object sender, EventArgs e)
          {
              StreamReader reader = new StreamReader("D:\\input1.txt");
              string line;
              while ((line = reader.ReadLine()) != null)
              {
                  string[] parts = line.Split(' ');
                  string[] stopWord = new string[] { "is", "are", "am","could","will" };
                  foreach (string word in stopWord)
                  {
                      line = line.Replace(word, "");
                      tw.Write("+"+line);
                  }
                  tw.Write("\r\n");
              } 
  </code></pre>
  
  <p>but it doesn't show the result in the <strong>output file</strong> and the output file remain empty.</p>