【发布时间】:2010-04-26 20:30:25
【问题描述】:
我想对HashSet<string> 的元素进行排序,并通过; 字符加入它们。
Python 解释器版本:
>>> st = {'jhg', 'uywer', 'nbcm', 'utr'}
>>> strng = ';'.join(sorted(s))
>>> strng
'ASD;anmbh;ashgg;jhghjg'
我寻求的方法的 C# 签名:
private string getVersionsSorted(HashSet<string> versions);
我可以不使用 Linq 做到这一点,但我真的想学得更好。
非常感谢!
【问题讨论】:
-
谢谢大家;很难选择赢家。
标签: c# linq .net-3.5 python-3.x