title: How Do I save variables to a new text file so that those variables are loaded the next time the program runs?
body: <p>new C#er here. I'm making a console based RPG. It's coming along quite well, but I need to find out how to save the game. I would guess that there is a way to save variables from my app into a text file that can be used to load the variables when the application is run again. Unfortunately I have no idea where to start.</p>
  
  <p>Also I need a way to go to a point in the code when loading a save file.</p>
  
  <p>Some of my variables include:</p>
  
  <pre><code>int xCoordinate, yCoordinate, hp, hpmax, level;
  </code></pre>
  
  <p>Any sample code would be greatly appreciated.</p>