C
C Downey
Is there a way I can use the arraylist to store objects? I am trying to get
my function to return an arraylist of my objects but I keep getting
"System.NullReferenceException: Object reference not set to an instance of
an object" errors.
Any help would be greatly appreciated
Eg:
Dim alAs ArrayList
Dim report As New ReportClass()
Do While dr.Read
report = New ReportClass()
report.ID = dr("id")
report.ID = dr("otherstuff")
al.Add(report)
Loop
my function to return an arraylist of my objects but I keep getting
"System.NullReferenceException: Object reference not set to an instance of
an object" errors.
Any help would be greatly appreciated
Eg:
Dim alAs ArrayList
Dim report As New ReportClass()
Do While dr.Read
report = New ReportClass()
report.ID = dr("id")
report.ID = dr("otherstuff")
al.Add(report)
Loop