I have a class
MyClass {
private & public fields;
private & public methods;
}
YourClass {
private & fields;
private & public methods;
}
Now there is another class in which there is methos which returns like this MyClass Object. How can I access YourClass.method from this returned Object MyClass . Inputs would be higly appreciated.
I tried casting the the return type object like this. (YourClass)MyClass which did not work.
6