title: Creating dictionary that map type T as key to instance of type T
body: <p>I want to create a dictionary between type and instance of that type.<br>
  For example for the dictionary MyTypeDictionary : </p>
  
  <pre><code>Dictionary&lt;Type,InstanceOfType&gt; MyTypeDictionary = new  Dictionary&lt;Type,InstanceOfType&gt;();                        
  MyTypeDictionary.Add(typeof(int),4);  
  MyTypeDictionary.Add(typeof(string),"hello world");  
  MyTypeDictionary.Add(typeof(DateTime),Datetime.Now); 
  int MyInt = MyTypeDictionary[typeof(int)];
  </code></pre>
  
  <p>What is the proper way to do so?</p>