title: System.Diagnostics.Process.Start for .pdf file paths in SQL
body: <p>Good day.
  In my C# windows forms app, I would like to open .pdf files.
  The code to do this is:</p>
  
  <pre><code>private void btnOpenPdf_Click(object sender, EventArgs e)
  {
      try
      {
          System.Diagnostics.Process.Start(lblPdf.Text);
      }
      catch (Exception ex)
      {
          MessageBox.Show(ex.Message);
      }
  }
  </code></pre>
  
  <p>The .pdf file paths are storred in an SQL database. 
  They are stored in this manner: C:\Folder1\Folder2\File Name</p>
  
  <p>In this example this means:</p>
  
  <pre><code>lblPdf.Text="C:\Folder1\Folder2\File Name";
  </code></pre>
  
  <p>*note: File Name(s) is/are stored without file type (so no .pdf at the end)</p>
  
  <p>Of course this doesn't work, so I added the "@" and ".pdf" to the string:</p>
  
  <pre><code>lblTest.Text = ("@" + "\"" + lblPdf.Text + ".pdf" + "\"");
  </code></pre>
  
  <p>When I test this with a Message Box:</p>
  
  <pre><code>MessageBox.Show(lblTest);
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code> @"C:\Folder1\Folder2\File Name.pdf"
  </code></pre>
  
  <p>The trouble I am experiencing is that this works:</p>
  
  <pre><code>private void btnOpenPdf_Click(object sender, EventArgs e)
  {
      try
      {
          MessageBox.Show(lblTest.Text);            
          System.Diagnostics.Process.Start(@"C:\Folder1\Folder2\File Name.pdf");
      }
      catch (Exception ex)
      {
          MessageBox.Show(ex.Message);
      }
  }
  </code></pre>
  
  <p>and this does not work:</p>
  
  <pre><code>private void btnOpenPdf_Click(object sender, EventArgs e)
  {
      try
      {
          MessageBox.Show(lblTest.Text);            
          System.Diagnostics.Process.Start(lblTest.Text);
      }
      catch (Exception ex)
      {
          MessageBox.Show(ex.Message);
      }
  }
  </code></pre>
  
  <p>Can anyone shed a light on why this is so?</p>
  
  <p>The error message I receive in the second example is:
  "The system cannot find the file specified"</p>
  
  <p>MessageBox.Show gives me the correct syntax and file path in both cases.</p>
  
  <p>Thank you.</p>