Skip to Content
Former Member
Sep 03, 2014 at 04:06 PM

How to Access the class attribute that refers to some other class


Hi All,

I have one doubt on how to access the attributes of a class that has been declared as TYPE REF TO some other class or interface. In my case type ref to is pointing to some other class whose attribute is suppose to be set using the object of a class that inherits the first class. I am not having the code snippet to make my requirement even more clear but hope you could have got an idea of my problem.

When I tried accessing it directly through the object of the inherited class it gives a run-time error as the attribute is accessed via null reference.

Your help is needed to solve this.

Thanks in advance.