title: Combine Current Directory with file name in vb.net
body: <p>I have tested the following two codes .The first one works as I'm giving the full path name but the second one give the error saying the file is not found.The value of the path location is shown same in both the cases.I think i'm not concatenating the stings right.I have also tried to give the filename without the extension.Any help?</p>
  
  <p>1st code </p>
  
  <pre><code>    Dim content As String
      Dim path As String
      path = "C:\Users\****\bin\Debug\tns.txt"
      MessageBox.Show(path)
      Try
          Dim sr As New StreamReader(path)
          content = sr.ReadToEnd()
          Console.WriteLine(content)
          MessageBox.Show(content)
      Catch ex As Exception
          MessageBox.Show(ex.Message.ToString())
      End Try
  </code></pre>
  
  <p>2nd code</p>
  
  <pre><code> Dim content As String
      Dim path As String
      path = Directory.GetCurrentDirectory() + "\tns.txt"
      MessageBox.Show(path)
      Try
          Dim sr As New StreamReader(path)
          content = sr.ReadToEnd()
          Console.WriteLine(content)
          MessageBox.Show(content)
      Catch ex As Exception
          MessageBox.Show(ex.Message.ToString())
      End Try
  </code></pre>