title: How do I reference a parent from a child object with generic interfaces in C#?
body: <p>I have the following interface declarations:</p>
  
  <pre><code>interface IOrder&lt;T&gt; where T: IOrderItem
  {
       IList&lt;T&gt; Items { get; set; }
  }
  
  interface IOrderItem
  {
       IOrder&lt;IOrderItem&gt; Parent { get; set; } // What do I put here?
  }
  </code></pre>
  
  <p>I want the items in the list to have a reference to the header object, so it can use the ID and other fields from the header.</p>
  
  <p>In my concrete classes, it complains that I don't implement "Parent" properly.</p>
  
  <pre><code>class StoreOrder : IOrder&lt;StoreOrderItem&gt;
  {
      public IList&lt;StoreOrderItem&gt; Items { get; set; }
  }
  
  class StoreOrderItem : IOrderItem
  {       
      public StoreOrder Parent { get; set; } // This doesn't satisfy the interface
  }
  </code></pre>
  
  <p>I tried setting up <code>IOrderItem</code> as <code>IOrderItem&lt;T&gt;</code> and passing in the Parent type, but that lead to circular reference since the Header class requries the Item class type... I got confused.</p>
  
  <p>Any advice on how to implement this properly?</p>