命名空间: System.Collections.Generic
Dictionary<TKey, TValue> 类
KeyValuePair<TKey, TValue> 结构
用指定的键和值初始化 KeyValuePair<TKey, TValue> 结构的新实例。
Dictionary<string, int> data = new Dictionary<string, int>();
data.Add("a", 1);
data.Add("b", 2);
data.Add("c", 3);
foreach (KeyValuePair<string , int> item in data)
{
Debug.Log(item.Key+" = " + item.Value);
}