originally posted by lam
Next, other people might have different opinion; but I believe that you have 2 references, 2 objects, and just a variable.
Hi, lam, i agreed with your reasoning except some concept. i am not sure about the reason of your discrimination between the reference and variable here.
fist, i think 'item','stuff'and 'entity' are all legal variable, their type is Thing.
second,'item' and 'entity' both hold a valid refencnce(Assuming casting is properly done).
third, here we diverge, i think varible 'stuff' still hold a reference, a special reference, null reference(more exactlly, it is of a special type, null type, while the null reference can always be cast to any reference type), through i don't know whether a null reference is a valid reference, i think the variable 'stuff' is a valid reference variable.
we could suppose that any refencnce variable automatically hold a null reference whenever the variable declaration statement execuated.
that's all my own opinion, pls correct me if i'm wrong.
Regards.
James
[This message has been edited by James Du (edited April 24, 2001).]