title: Access an Object in Another Class from an Interface?
body: <p>Is this even possible? Here is the important parts of the code I am currently working with:</p>
  
  <pre><code>public class Bag : IBag
  {
      public IRack NewRack() { ...some code here...}
  }
  
  public class Rack : IRack
  {
     public void SwapAllTiles() { ...can I access the Bag object here somehow?... }
  } 
  </code></pre>
  
  <p>My question is, can I access the current Bag object in the Rack class without deriving from the Bag class, like through the IRack interface somehow? The way I have it working right now is I have Rack derive from Bag and I can use a getter to access the current bag's instance, but this doesn't seem like good form. Would using a static instance be better? </p>
  
  <p>NOTE: I don't want to put a private Bag object in my Rack class, there are technically separate (its basically a scrabble tile bag and a scrabble rack. I need the rack to be able to reference or access the bag for the tiles within it but I do not want each rack to have its own bag.)</p>