I'm not sure I understand what you want to do, but I'll still try to offer you some work. If A1 and A2 can not do anything without each other, it does not seem inconsistent to add each of these classes a reference to an object of another class form of property for example:
Code:
class A1
{
public A2 RefA2 { get ; set ; }
...
}
class A2
{
public A1 RefA1 { get ; set ; }
...
}
and when you create instances, you are connected to:
Code:
A1 aA1 = new A1 ();
A2 aA2 = new A2 ();
aA1. RefA2 = aA2;
aA2. RefA1 = aA1;
in your class A1, you can now call public functions (or features protected) object A2, and vice versa
Well, ok, the names "RefA1" and "RefA2" are not top, but good, "A1" and "A2" is not great either speaking
Bookmarks