title: How to Add Children To a List C#
body: <p>Okay Im new to C# and have a quick question. I am learning XNA right now and I need to have a loop that will draw all my items.</p>
  
  <pre><code>public class DrawnObject
  {
  //Declare some Variables
      void draw()
      {
          //Draw Stuff
      }
  }
  
  public class child1 : Drawnobject
  {
      //More Code
  }
  
  public class child2 : Drawnobject
  {
      //More Code
  }
  
  public class Game1
  {
      public List&lt;DrawnObject&gt; drawlist;
      child1 child1object;
      child2 child2object;
      DrawnObject parentobject;
  
      public void dosomthin()
      {
          drawlist.Add(child1);
          drawlist.Add(child2);
          drawlist.Add(parentobject);
      }
  }
  </code></pre>
  
  <p>This is what I have, regretfully it doesn't work though. it is giving me Error: 'ObjectParentTest.child1' is a 'type' but is used like a 'variable'. Thanks in advance for the help</p>