A
Adam Suszeck
I have an application that has a state class, which basically stores
application information for other forms to access during the execution of
the application.
In state, I store an array which contains a number of positions. Depending
on what the user is doing in the application, this may hold 10 or 20 items.
The array length and items are set by another form in the application, ie.
not the state class.
The trouble is, I'm running into problems with null reference pointers. So
despite checking first off that the array is set and is not empty, i still
have exceptions cropping up.
Should I just wrap this in a try catch block and handle any exceptions, or
is there a better way of doing this?
Many thanks.
application information for other forms to access during the execution of
the application.
In state, I store an array which contains a number of positions. Depending
on what the user is doing in the application, this may hold 10 or 20 items.
The array length and items are set by another form in the application, ie.
not the state class.
The trouble is, I'm running into problems with null reference pointers. So
despite checking first off that the array is set and is not empty, i still
have exceptions cropping up.
Should I just wrap this in a try catch block and handle any exceptions, or
is there a better way of doing this?
Many thanks.