您好所有我有一個問題,當嘗試在我的課「響應」與VB.Net添加數據,我運行debbug得到一個錯誤消息「檢測空ReferenceException」你知道我應該糾正這個錯誤嗎?可以幫助我。謝謝。問題與VB錯誤消息「檢測NullReferenceExceptio」
下面部分的代碼
Module Module1
Sub Main()
try
dim res as new response
a.customers(1).phoneNumber="11023321"
a.customers(2).phoneNumbre="11023300"
a.expand=False
a.include=false
En sub
Public Class Response
Public Property Customers As List(Of Customer)
Public Property Expand As Boolean
Public Property Include As Boolean
End Class
Public Class Customer
Public Property PhoneNumber As String
End Class
是不完整的錯誤消息,並且沒有說在哪一行它發生 – Plutonix