0

This is the piece of code where the exception is thrown:

Private Sub btnNext_Click(sender As Object, e As EventArgs) Handles btnNext.Click
    File.OpenText("F:\CustomerRecords.txt")
    Dim customer As New CustomerRecord
    customer.strLastName = customersFile.ReadLine().ToString()
    lblLastName.Text = customer.strLastName
End Sub
Héctor M.
  • 2,302
  • 4
  • 17
  • 35
  • 1
    What's `customersFile` ? – gkb Apr 12 '18 at 01:26
  • 1
    Possible duplicate of [What is a NullReferenceException, and how do I fix it?](https://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix-it) – Alex Wiese Apr 12 '18 at 01:28

0 Answers0