title: How to get the first row from the txt File in vb.net
body: <p>This is my code for reading the txtfile and put it in the datagridview</p>
  
  <pre><code>Dim filename As String = String.Empty
  Dim TextLine As String = ""
  Dim SplitLine() As String
  
  
      ofd1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*"
      ofd1.FilterIndex = 2
      ofd1.RestoreDirectory = True
      ofd1.Title = "Open Text File"
  
      'get the filename of the txt file
      If ofd1.ShowDialog() = DialogResult.OK Then
          filename = ofd1.FileName
      End If
  
      'if the filename is existing
      If System.IO.File.Exists(filename) = True Then
  
          Dim objReader As New System.IO.StreamReader(filename)
  
          Do While objReader.Peek() &lt;&gt; -1
              TextLine = objReader.ReadLine()
              SplitLine = Split(TextLine, ",")
              dvList.Rows.Add(SplitLine)
          Loop
  
      End If
  </code></pre>
  
  <p>This is the txt File:</p>
  
  <pre><code>False, 1-305-9097-01-2, 879.75, 122009, fr
  False, 1-305-9097-02-2, 879.75, 122009, fr
  False, 1-305-9097-02-3, 879.75, 122009, fr
  False, 1-305-9097-03-5, 899.75, 122009, fr
  </code></pre>
  
  <p>Now I want to get only the first record of my txtfile and put it in the msgbox, How can I do this?</p>
  
  <p>I tried this:</p>
  
  <pre><code>MsgBox(SplitLine.tostring)
  </code></pre>
  
  <p>But the output of this code is this: <strong>System.String[]</strong></p>
  
  <p>Thank you.</p>