title: Writing Text File to Folder on Desktop
body: <p>I'm wondering how do you write a text file to a specific location on the desktop such as C:\Users\tommy\desktop\transaction\ using StreamWriter?</p>
  
  <pre><code>    private void CreateTransaction_Click(object sender, EventArgs e)
      {
          StreamWriter outputFile;
          outputFile = File.CreateText (TID.ToString()+".txt");
  
          outputFile.WriteLine("Investor :" +" " + InvestorNameLabel.Text);
          outputFile.WriteLine("Initial Amount" + " " +AmountLabel.Text);
          outputFile.WriteLine("Date Invested" +" " +DateLabel.Text);
          outputFile.WriteLine("Period Chosen" + " "+DaysInvestedLabel.Text);
          outputFile.WriteLine("Rate Chosen" + " " + RateLabel.Text);
          outputFile.WriteLine("Total Interest" + " " +InterestAmountLabel.Text);
          outputFile.WriteLine("Transaction Number :" + " " + TransactionIDLabel.Text);
          outputFile.Close();
  
          MessageBox.Show("Transaction file for Transaction: " + TransactionIDLabel.Text + "Was Created", "Transaction File");
  
  
      }
  </code></pre>