Create list <string> from HashTable keys?

Hey, how could I do this as short as possible?

Thanks: -)

+4
source share
1 answer

Try the following:

System.Collections.Hashtable ht = new System.Collections.Hashtable(); List<string> list = ht.Keys.Cast<string>().ToList(); 
+11
source

Source: https://habr.com/ru/post/1316393/


All Articles