title: Vb.net System.IO.StreamReader Empty path name is not legal
body: <p>I have a fault with System.IO.StreamReader.</p>
  
  <pre><code>Public Class Project
  
      Dim merah As Integer
      Dim File_Directory As OpenFileDialog = New OpenFileDialog()
      Dim objReader As New System.IO.StreamReader(File_Directory.FileName)
      Dim Text_LineByLine As String
  
  Private Sub BrowseFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BrowseFile.Click
  
  
  
      File_Operations()
      'Do While objReader.Peek() &lt;&gt; -1
      Default_Operations()
      MessageBox.Show(Text_LineByLine)
      'Loop
  
  End Sub
  
  Sub File_Operations()
      File_Directory.InitialDirectory = "C:\"
      File_Directory.Filter = "All files (*.txt)|*.txt|All files (*.txt)|*.txt"
      If File_Directory.ShowDialog() = DialogResult.OK Then
          BrowserPath.Text = File_Directory.FileName
      End If
  End Sub
  </code></pre>
  
  <p>When the program starts, The faultis  'Empty path name is not legal.'</p>
  
  <p>How to solve this fault?</p>
  
  <p>Thanks for any helping.</p>