【发布时间】:2015-11-23 10:22:47
【问题描述】:
如何将hashset 的值写入控制台?我不想使用foreach 循环。
HashSet<string> hashSet=new HashSet<string>();
hashSet.Add("Employee");
hashSet.Add("Employee1");
Console.WriteLine(hashSet.Select(x=>x));
输出
System.Linq.Enumerable
预期输出
雇员,雇员1
【问题讨论】: