I'm sure there is a very simple solution to this problem, I just cannot seem to get my head around it. How can I expose methods or properties of an object inside a collection as part of another object. Let me give you a real world example:
Class A has properties Prop1, Prop2 and Prop3; and just one method, Method1
Class B has its own properties, Prop4 and Prop5, and also one method, Method2
Now, I want Prop1 to be a collection for Class B objects. Using a collection type I can add new objects to Prop1, but I cannot access Prop4, Prop5 or Method2 directly...
I hope this all makes sense, please let me know if you need more details. I'm sure I've just missed something simple....
Class A has properties Prop1, Prop2 and Prop3; and just one method, Method1
Class B has its own properties, Prop4 and Prop5, and also one method, Method2
Now, I want Prop1 to be a collection for Class B objects. Using a collection type I can add new objects to Prop1, but I cannot access Prop4, Prop5 or Method2 directly...
I hope this all makes sense, please let me know if you need more details. I'm sure I've just missed something simple....