You're probably better off using ReferenceEquals(obj, null). This will
always work. The equality operator (==) could be overloaded and might
be checking if the values are equal instead of the references, so
ReferenceEquals() is a safer bet.
You're probably better off using ReferenceEquals(obj, null). This will
always work. The equality operator (==) could be overloaded and might
be checking if the values are equal instead of the references, so
ReferenceEquals() is a safer bet.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.