A simple form app has some parameters that are written to a text file on close.
Class FORM1
private param1 as string
public paramset() as string 'Public because they are accessed in a child form
...
sub Form_closing (sender As Object, e As CancelEventArgs) handles ME.Closing
writeparamFile ()
end sub
private sub writeparamFile ()
paramFile = New StreamWriter(thisProgramsPath & "X.ini")
Using paramFile
paramFile.WriteLine("param1=" & param1)
paramFile.WriteLine("paramset=" & paramset(0) & "," & paramset(1) )
end using...
end sub
end class
While the first write-line works well and on debug PARAM1 has the correct value,
the array PARAMSET is set to NOTHING and writing generates a runtime exception.
Why is that? How do we get the array values at this stage of execution to record?