title: C# cast Dictionary<string, AnyType> to Dictionary<string, Object> (Involving Reflection)
body: <p>Is it possible to cast a <code>Dictionary&lt;string, Anything&gt;</code> to a consistent intermediate generic type?  So I would be able to cast <code>&lt;string, string&gt;</code>, <code>&lt;string, bool&gt;</code>, <code>&lt;string, int&gt;</code>, <code>&lt;string, anything&gt;</code> all to the same type of dictionary?</p>
  
  <p>I am working on a project that is using heavy reflection and I need to be able to process DIctionary types as such:</p>
  
  <pre><code>FieldInfo field = this.GetType().GetField(fieldName);
  Dictionary&lt;string, Object&gt; dict = (Dictionary&lt;string, Object&gt;)field.GetValue(this);
  </code></pre>
  
  <p>The above code is what I currently have and the program always fails at the cast from field.GetValue to the generic <code>Dictionary&lt;string, Object&gt;</code>.</p>
  
  <p>Is there a way to do this?  Or should I just figure out a different way to process these Dictionaries?</p>
  
  <p>Any help would be greatly appreciated.</p>