Get random element from hashset?
Random randomizer = new Random();
string[] asArray = hashs.ToArray()
string randomLine = asArray[randomizer.Next(asArray.length)];
a simple answer like the accepted one is possible without enumerating the entire array every time:
private static readonly Random random = new Random();
private static readonly HashSet<T> hashset = new HashSet<T>();
...
T element = hashset.ElementAt(random.Next(hashset.Count));