jazzmaster111
Programmer
Hi:
I 'm declaring an arraylist and I want to make it equal to a function that returns an arraylist.
This is my code
Dim array1 As New ArrayList()
array1=makeArray2()
Function makeArray2() as ArrayList
Dim array2 As New ArrayList()
array2.Add("hi")
array2.Add("hello")
Return array2
End Function
I get a System.NullReferenceException on this line
array1=makeArray2()
what could be wrong?
Thanks!!
I 'm declaring an arraylist and I want to make it equal to a function that returns an arraylist.
This is my code
Dim array1 As New ArrayList()
array1=makeArray2()
Function makeArray2() as ArrayList
Dim array2 As New ArrayList()
array2.Add("hi")
array2.Add("hello")
Return array2
End Function
I get a System.NullReferenceException on this line
array1=makeArray2()
what could be wrong?
Thanks!!