How do I get the list of keys in a Dictionary?

后端 未结 9 850
梦谈多话
梦谈多话 2020-12-02 11:38

I only want the Keys and not the Values of a Dictionary.

I haven\'t been able to get any code to do this yet. Using another array proved to be too much work as I use

9条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-02 12:27

    I often used this to get the key and value inside a dictionary: (VB.Net)

     For Each kv As KeyValuePair(Of String, Integer) In layerList
    
     Next
    

    (layerList is of type Dictionary(Of String, Integer))

提交回复
热议问题