Forum Discussion
SZ_1
7 years agoOccasional Contributor
Also as I mentioned in my original post, checking for not null or null does not throw any error but I need to know if checking for not null will guarantee no problem accessing the properties of the objects.
I tried this on the niewPort and it worked so far as viewPort has been alwasy found.
AlexKaras
7 years agoCommunity Hero
Hi,
> I need to know if checking for not null will guarantee no problem accessing the properties of the objects.
No. As it is documented, .FindXXX() method always returns found object or object stub if the search finds nothing.
Thus check for not null will always succeed.
Correct way is to check for object.Exists and use aqObject.IsSupported(...) when needed.