title: The same property name but different return type in a generic list
body: <p>Beginner's question: How to implement a generic list <code>List&lt;Item&gt;</code> returning items with a property named Data but returning different types for different subclasses? I started building the following hierarchy, but that does not lead to the goal.</p>
  
  <pre><code>abstract class Item
  abstract class ItemGeneric&lt;TData&gt; : Item
  class ItemText : ItemGeneric&lt;string&gt;
  class ItemImage : ItemGeneric&lt;Image&gt;
  </code></pre>
  
  <p>I create a bunch of instances of ItemText and ItemImage classes and add them to a generic <code>List&lt;Item&gt;</code> list. However once I go through the list and want to retrieve the  Data property it is not accessible as (obviously) it was implemented only in <code>ItemGeneric&lt;TData&gt;</code> class hierarchy level and not in the Item class.</p>
  
  <p>I would like to solve this problem without using <code>System.Object</code> to avoid casting.</p>
  
  <p>Is there any common pattern for solving this problem?</p>