Hello, I am declaring a variable (as a project member) within a class. The variable type is another class that I have already designed - actually, this is a kind of record holding several internal values. Normally, I put the default value of my variable as null, and update it in code when necessary (it holds some state information).
Here's my questions:
(1) should I (generally) use null as a default value for varaibles like this, before the code runs (and changes the values)?
(2) does the value of the varable become "not null" when the variable is used to store some new values (that is, when the code is running)?
I am asking because I am testing my variable for "null", and am getting some strange results - the value of the variable seems to be equal to null, even when the record (the data type) holds some real values. Am I doing something wrong?
Thanks!