定義可設置或檢索的鍵/值對。
命名空間:System.Collections.Generic
程序集:mscorlib(在 mscorlib.dll 中)
Dictionary.Enumerator.Current 屬性返回此類型的實例。
//Dictionary<string, int> dicNum = new Dictionary<>(string, int);
foreach(KeyValuePair<string, int> kvp in dicNum)
{
Console.Write(string.Format("{0} = {1};", kvp.Key, kvp.Value));
}