Dict.Count

        static void Main(string[] args)
        {
            Dictionary<string, string> paraNameValueDict = new Dictionary<string, string>();
            int count = 0;
            count = paraNameValueDict.Count;
            Console.WriteLine("{0}", count);
            paraNameValueDict["hello"] = "World";
            count = paraNameValueDict.Count;
            Console.WriteLine("{0}", count);
            //0
            //1
            //请按任意键继续. . .
        }

 

posted @ 2017-03-19 13:42  sky20080101  阅读(151)  评论(0编辑  收藏  举报