get dictionary value by key

前端 未结 10 1951
逝去的感伤
逝去的感伤 2020-11-29 20:47

How can I get the dictionary value by key on function

my function code is this ( and the command what I try but didn\'t work ):

static void XML_Array         


        
10条回答
  •  情书的邮戳
    2020-11-29 21:30

    Dictionary d = new Dictionary();
            d.Add("1","Mahadev");
            d.Add("2","Mahesh");
            Console.WriteLine(d["1"]);// it will print Value of key '1'
    

提交回复
热议问题