What is the best way to code to know if a property exists? Basically, I have a class which contains a lot of most commonly used labels. Sometimes, I have to go get the string from that class, from one of its property, such as oProcess.oLabel.cFirstName and oProcess.oLabel.cCity, for example, which would return "First name" and "City".
But, if someone types something like oProcess.oLabel.cAPropertyNameThatDoesNotExist, this will generate an error in the designer. So, what would be the proper approach to code it so the designer will not complain and I will be able to skip a portion of code if the property does not exist?
I am looking for something like:
If Not IfPropertyExist("oProcess.oLabel.cCity") Is Nothing
Something
End If