How can I sync three classes?
- by TheMachineCharmer
class Foo
{
Bar b;
List<Foo> Neighbours;
}
class Bar
{
Spam s;
List<Bar> Neighbours;
}
class Spam
{
List<string> Neighbours;
}
Each of these classes have AddNeighbour,RemoveNeighbour methods.
User can add/remove Neighbours from any of the class at random.
I want these three objects to be in sync.
How can I do this?