B
Bob
I have a reference type variable and I need to check whether it has actual
value or not. However, the following fails:
MyUserClass myObj;
........
if (myObj== null) {
......
I get the compiler error: Operator '==' cannot be applied to operands of
type 'MyUserClass' and '<null>'
How do I check if the variable is initialized before I call the public
members then?
Thanks
Bob
value or not. However, the following fails:
MyUserClass myObj;
........
if (myObj== null) {
......
I get the compiler error: Operator '==' cannot be applied to operands of
type 'MyUserClass' and '<null>'
How do I check if the variable is initialized before I call the public
members then?
Thanks
Bob