title: c# How can I define a dictionary that holds different types?
body: <p>If have the following code. Where you see the XXX I would like to put in an array of type long[]. </p>
  
  <p>How can I do this and how would I fetch values from the dictionary? Do I just use defaultAmbience["CountryId"][0] to get the first element?</p>
  
  <pre><code>public static Dictionary&lt;string, object&gt; defaultAmbience = new Dictionary&lt;string, object&gt;
  {
      { "UserId", "99999" },
      { "CountryId", XXX },
      { "NameDefaultText", "nametext" },
      { "NameCulture", "it-IT" },
      { "NameText", "namelangtext" },
      { "DescriptionDefaultText", "desctext" },
      { "DescriptionCulture", "it-IT" },
      { "DescriptionText", "desclangtext" },
      { "CheckInUsed", "" }
  };
  </code></pre>