title: C# Why does System.IO.File.Exists keep coming up false?
body: <blockquote>
  <pre><code>string profile = "\\" + txtProfileLoad.Text + ".txt";
  profile = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + profile;
  </code></pre>
  </blockquote>
  
  <p>The variable profile is receiving the correct file path, but when I run it the File.Exists comes up false every time. </p>
  
  <pre><code>        if (System.IO.File.Exists(profile) == true)
          {
              System.IO.StreamReader profileReader;
              profileReader = new System.IO.StreamReader(profile);
  
              do
              {
                  profileLevel = profileLevel + profileReader.ReadLine() + "\r\n";
              } while (profileReader.Peek() != -1);
  
              loadName(profileLevel);
  
              wordBeingUsed.finalWord = loadedName;
  
              Close();
          }
          else
          {
              MessageBox.Show("Invalid file name. Please try again.");
          }
  </code></pre>
  
  <p>There aren't any permissions stopping it from seeing the file.
  Any help with this would be appreciated. It's been driving me crazy.</p>