title: How to write strings to a txt in the xna content folder
body: <p>I have a txt file that is in my content folder for my XNA game. I have been able to read data from that file using the stream reader; however I was not able to write strings to it using the stream*writer* because it says I cannot write to the stream. </p>
  
  <p>I use the content folder so that I may store high scores externally and that I may publish the game with the high score txt. I need to add the string "OEB 3350" to this file.</p>
  
  <p>The location of my file is "Content\leaderboard.txt"</p>
  
  <p>How does one write to this txt file.</p>
  
  <pre><code>public void updateExternalLeaderboard() 
      {
          string[] leaderboardArray = new string[orderedScoreList.Count];
  
          System.IO.Stream stream = TitleContainer.OpenStream("Content\\leaderboard.txt");
          System.IO.StreamWriter swriter= new System.IO.StreamWriter(stream);
  
  
          for (int p = 0; p &lt; orderedScoreList.Count; p++) 
          {
              leaderboardArray[p] = orderedScoreList[p].initials + " " + orderedScoreList[p].scoreString;
              swriter.WriteLine(leaderboardArray[p]);
          }
          swriter.Close();
  
      }
  </code></pre>