title: C# Nested Class Access Parent Member
body: <p>Is it possible to access a parent member in a child class... </p>
  
  <pre><code>class MainClass {
    class A { Whatever }
  
    class B {
      List&lt;A&gt; SubSetList;
  
      public void AddNewItem(A NewItem) {
         Check MasterListHere ????
      }
    }
  
    List&lt;A&gt; MasterList;
  }
  </code></pre>
  
  <p>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.</p>
  
  <p>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.</p>