Is it possible to access a parent member in a child class...
class MainClass {
class A { Whatever }
class B {
List<A> SubSetList;
public void AddNewItem(A NewItem) {
Check MasterListHere ????
}
}
List<A> MasterList;
}
So... my main class will have a master list. It will also have a bunch of instances of B. In each instance of B, I want to add new A's to the particular B, but only if they exist in the Master List. I toyed with making the MasterList static and it works ... until I have more than one instance of MainClass... which I will have.
I could pass a reference to MasterList to each instance of B, but I will eventually have multiple of these "MasterLists" and i don't want to have to pass lots of references if i don't have to.