title: C# - Dictionary, Can i set type of value in constructor? .NET 2.0
body: <p>Is there any way how to achieve something like this? I have found that dynamic can be solution but its from .NET 4.0+ :/       </p>
  
  <pre><code> public class Message
          {
              public int ID;
              Dictionary&lt;dynamic, dynamic&gt; dict
  
              public Message(int ID, Dictionary&lt;dynamic, dynamic&gt; Data)
              {
                  this.ID = ID;
                  dict = Data
              }
          }
  </code></pre>
  
  <p>The reason is because sometimes i want dictionary with string:string and sometimes with string:int so I would like to have this class a little dynamic and not 2 classes.</p>