开发者

Create a List<string> from HashTable keys?

Hey, how coul开发者_如何学编程d I do this as short as possible?

Thanks :-)


Try this:

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜