get dictionary value by key

前端 未结 10 1937
逝去的感伤
逝去的感伤 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条回答
  •  Happy的楠姐
    2020-11-29 21:04

              private void button2_Click(object sender, EventArgs e)
                {
                    Dictionary Data_Array = new Dictionary();
                    Data_Array.Add("XML_File", "Settings.xml");
    
                    XML_Array(Data_Array);
                }
              static void XML_Array(Dictionary Data_Array)
                {
                    String xmlfile = Data_Array["XML_File"];
                }
    

提交回复
热议问题