我已经在这里回答了许多问题.但究竟是什么意思呢?
var test = new Dictionary<int, string>();
test.Add(0, "zero");
test.Add(1, "one");
test.Add(2, "two");
test.Add(3, "three");
Assert(test.ElementAt(2).Value == "two");
Run Code Online (Sandbox Code Playgroud)
上面的代码似乎按预期工作.那么字典被认为是无序的?在什么情况下上面的代码会失败?