title: Using text files in Visual Studio Project
body: <p>I am making a console program in VS2010.  The structure of as layed out in the solution explorer is Project file, Properties folder, References, and Program.cs.</p>
  
  <p>I want to make use of a text file for reading/writing.  What is the correct way of adding this file to the project? If I just do <code>StreamWriter sw = new StreamWriter("maze.txt")</code> then it'll create the file in the output folders (bin/debug or bin/release).  But it won't show up in the solution explorer.</p>
  
  <p>Now if I right-click on the solution explorer and Add New Item, I can create a text file in the root project folder (same level as Program.cs).  This will show up in the solution explorer.</p>
  
  <p>Is there a way for me to access this newly created file? Other than doing something like <code>StreamWriter sw = new StreamWriter("../../maze.txt")</code> by specifying the path to be two parents up?</p>
  
  <p>How am I supposed to manage external files in a Visual Studio console applicatoin? In a WinForms application, there's a resources folder where I can add these things and a <code>Resources.resx</code> file to manage it.  I can access it with <code>Properties.Resources.someres</code>.</p>