title: How to share derived fields between instances of the same class?
body: <p>I'm working on a game in C# (XNA) and I can't figure out how to do this.
  Here's a really simplified version of what I have going on:</p>
  
  <pre><code>class GameObject
  {
      Protected Sprite mSprite;
      Protected string filename;
  
      public LoadContent(ContentManager theContentManager)//XNA forces you to load content through a Content Manager which belongs to the main game class
      {
      mSprite.Load(theContentManager, filename);//the Sprite class contains a texture and methods to deal with loading images, animating, etc
      }
  }
  
  class SomeObject : GameObject
  {
      public SomeObject()
      {
      filename = "someobject.png";
      }
  }
  </code></pre>
  
  <p>Each instance of 'SomeObject' has the same Sprite, which gets loaded by the inherited loadContent method after the 'SomeObject' is initiated. Generally the LoadContent method is only called once at the beginning of the game. </p>
  
  <p>However, I want to be able to add new objects after the game is currently running. It would be nice if I could make each instance of 'SomeObject' share the same sprite so that a new instance wouldn't have to load the same image again. Currently I just copy the sprite from an existing object, e.g. 
  <code>someObject2.mSprite = someObject1.mSprite</code>
  But this only works if there is an existing instance of that class to copy from. What I would like to do is have mSprite be static, but if I declare it as static in the base class, all other objects will get the same sprite, and if i declare it in the derived class, I can't figure out how to load the image without re-writing the load method into every class.
  Is there any way to do this?</p>