Ho alcuni oggetti ciascuno contenente un elenco di variabili e un elenco che contiene tutte le variabili di questi oggetti, ad esempio
class A
{
List<Var> varList;
}
class B
{
List<A> aList;
List<Var> allVarOfAs;
// it is a common list which holds the members of varList of all members of the aList
}
Ora, se un oggetto da varList in un oggetto di aList (un oggetto A in B ) viene rimosso, come posso aggiornare la lista comune allVarOfAs ?
Qual è lo schema per tale situazione?