Hey, I am writing an application for one of my classes and I was wondering if anyone can help me with this problem. I want to see if an object passed back from a function is equal to nothing. When I just type obj = nothing, i get the error that the operator '=' is not defined for this class. The class I am trying to check is a class I wrote. Is there something I can add to the class I wrote to allow me to use this operator or some way I can compare it to nothing.
Thanks,
Kevin
How to compare an object to nothing when the operator '=' is not defined for that object
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

jingeRank #2,527 · 554 reputationPosted Oct 17, 2009, 1:26 AM EDT
Patrice Boucher4 reputationPosted Oct 18, 2009, 9:06 AM EDT
ex. If oMyClass is nothing Then
Patrice Boucher4 reputationPosted Oct 18, 2009, 9:06 AM EDT
ex. If oMyClass is nothing Then