title: Question about generics in C# comparing to Java
body: <p>In Java I can specify generic with wildcard "?". It is possible to create a map like this one:</p>
  
  <p><code>Map&lt;String, ?&gt;</code>.</p>
  
  <p>I'm working with C# and I need a <code>Dictionary&lt;String, SomeInterface&lt;?&gt;&gt;</code> (where ? can be int, double, any type). Is this possible in C#?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Example:</p>
  
  <pre><code>interface ISomeInterface&lt;out T&gt;{
   T Method();
   void methodII();
  }
  
  class ObjectI : ISomeInterface&lt;int&gt;{
      ...
  }
  class ObjectII : ISomeInterface&lt;double&gt;{
      ...
  }
  class ObjectIII : ISomeInterface&lt;string&gt;{
      ....
  }
  </code></pre>
  
  <p>I was trying to map this objects into Dictionary like:</p>
  
  <pre><code>Dictionary&lt;String, ISomeInterface&lt;?&gt;&gt; _objs = new Dictionary&lt;String, ISomeInterface&lt;?&gt;();
  
  _objs.Add("Object1", new ObjectI());
  _objs.Add("Object2", new ObjectII());
  _objs.Add("Object3", new ObjectII());
  
  foreach(var keyVal in _objs){
     Console.WriteLine(keyVal.Method());
  }
  </code></pre>
  
  <p>Objects that implement  ISomeInterface are loaded in runtime using Assembly and Activator.createInstance. In the moment of creation I don't if objects implements  <code>ISomeInterface&lt;int&gt;</code> or <code>ISomeInterface&lt;double&gt;</code>.</p>
  
  <p>Any help is very much appreciated.</p>