Set array key as string not int?

前端 未结 6 1063
耶瑟儿~
耶瑟儿~ 2020-12-03 06:58

I am trying to set the array keys as a strings like in the example below, but inC#.



        
6条回答
  •  余生分开走
    2020-12-03 07:30

    You could use a Dictionary:

    Dictionary dictionary = new Dictionary();
    dictionary["key_name"] = "value1";
    

提交回复
热议问题