C# Dictionary 的初始化方式

从C# 3.0 之后提供了初始化器,可以初始化Dictionary

Dictionary<string, string> UseFor = new Dictionary<string,string> {
            {"station","站点"},{"city","城市"},{"province",""}
        };

 

posted @ 2014-05-23 16:53  王晓阳  阅读(66932)  评论(0编辑  收藏  举报