I have looked this up on the net but I am asking this to make sure I haven\'t missed out on something. Is there a built-in function to convert HashSets to Lists in C#? I nee
Here's how I would do it:
using System.Linq; HashSet hset = new HashSet(); hset.Add(10); List hList= hset.ToList();
HashSet is, by definition, containing no duplicates. So there is no need for Distinct.
Distinct