Hi,
Apologies if this has already been covered in the forums. I'm new, and had a quick search but couldn't find anything.
I'm trying to create a structure such as:
Private Structure test
Dim x as Integer
Dim y as Integer
End Structure
In a subroutine later I want to use the structure to populate an element in an array, something like:
Private Function FillArray(Not important what I pass to function) as Array
Dim l_node as Array, struct_test as test, i as integer
i = 0
Do Until "some expression"
struct_test.x = 0
struct_test.y = 1
l_node.setvalue(struct_test, i)
i = i +1
Loop
Return l_node
End Function
For some reason this isn't working and I get a "NullReferenceException was unhandled" error. Can anyone help?
Thanks
Apologies if this has already been covered in the forums. I'm new, and had a quick search but couldn't find anything.
I'm trying to create a structure such as:
Private Structure test
Dim x as Integer
Dim y as Integer
End Structure
In a subroutine later I want to use the structure to populate an element in an array, something like:
Private Function FillArray(Not important what I pass to function) as Array
Dim l_node as Array, struct_test as test, i as integer
i = 0
Do Until "some expression"
struct_test.x = 0
struct_test.y = 1
l_node.setvalue(struct_test, i)
i = i +1
Loop
Return l_node
End Function
For some reason this isn't working and I get a "NullReferenceException was unhandled" error. Can anyone help?
Thanks