首页 > 代码库 > Dict.Count

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
            //请按任意键继续. . .
        }

 

Dict.Count