title: List with different types
body: <p>I'm new at the C# thing.... (.net 3.5)</p>
  
  <p>I want a Dictionary to hold two different types of object, one of the type is generic. while iterating through the list, i will call methods like add and clone.
   I have tried it with a base class and subclasses....</p>
  
  <pre><code>namespace ConsoleApplication1 {
      class Element{
      }
      class Child1 : Element {
          public Child1 Clone() { return clone; }
      }
      class Child2&lt;T&gt; : Element {
          public Child2&lt;T&gt; Clone() { return clone; }
      }
      class Program {
          static void Main(string[] args) {
              Dictionary&lt;string, Element&gt; d = new Dictionary&lt;string, Element&gt;();
              d.Add("c1",  new Child1());
              d.Add("c2s", new Child2&lt;string&gt;());
              d.Add("c2i", new Child2&lt;int&gt;());
              foreach (KeyValuePair&lt;string, Element&gt; kvp in d) {
                  Element e = kvp.Value.Clone();
              }
          }
      }
  }
  </code></pre>
  
  <p>Is there a way or solution for my needs?</p>
  
  <p>Thanks!
  Anna</p>