为什么我得到“对象引用未设置为对象的实例”异常?

时间:2018-04-12 01:16:32

标签: visual-studio exception readline

这是引发异常的代码段:

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

0 个答案:

没有答案