Dictionary通过下标获取key和value
Dictionary<int, string> dic = new Dictionary<int, string>();
Dictionary<int, string>.Enumerator en = dic.GetEnumerator();
for (int i = 0; i < dic.Count; i++)
{
if (en.MoveNext())
{
int key = en.Current.Key;
string value = en.Current.Value;
}
}
补充:软件开发 , C# ,