title: How to save and load an XML file in AppData?
body: <p>I've been teaching myself how to code lately because I am bored. I am trying to load an XML file on startup and put the contents of that file into a listbox, then save the contents of the listbox to the file on close. That's exactly what I have now. However I want to be able to load from AppData as well as save back to the AppData folder without having to type the full path. I've tried using "%AppData%/Roaming/MyApp/data.xml" but that does not work and throws a exception.</p>
  
  <p>Here is what I have now:</p>
  
  <pre><code>StreamReader sr = new StreamReader("data.xml");
              line = sr.ReadLine();
              while (line != null) {
                  Streamers.Items.Add(line);
                  line = sr.ReadLine();
              }
              Streamers.DataSource = line;
              Streamers.Sorted = true;
              sr.Close();
              Console.ReadLine();
  </code></pre>