Probably something stupid, but I'm trying to write values to an array of structures and keep getting "Object Reference not set to an instance of an Object". How do I initialize the array? The debug kind of code looks like this, all in the same form, VB.Net. When I Call WriteStepToStruct() I get the error.
Public Structure strutAnswers
Public EvalID As Integer
Public StepID As Integer
Public Topic As Integer
Public SubTopic As Integer
Public Comment As String
End Structure
Public Shared CurrentRunData As strutAnswers()
Public Function WriteStepToStruct() as integer
CurrentRunData(0).StepID = 1
CurrentRunData(0).EvalID = 1
CurrentRunData(0).Topic = 1
CurrentRunData(0).SubTopic = 1
CurrentRunData(0).Comment = "test"
Return 1
End Function
Regards, John