Skip to content

Instantly share code, notes, and snippets.

Created October 18, 2013 04:48
Show Gist options
  • Select an option

  • Save anonymous/7036623 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/7036623 to your computer and use it in GitHub Desktop.
.net framework 3.5 ok, 4.0 會出錯
static void Main(string[] args)
{
var o = new OrderedDictionary();
for (int i = 0; i < 3; i++)
{
o.Add(i, string.Format("{0}_{1}", i.ToString(), "yahoo"));
}
foreach (DictionaryEntry item in o)
{
o[item.Key] = DateTime.Now.ToString();
}
Console.WriteLine("no exception");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment