Im using the following piece of code to load my text file into a hashset.
HashSet<string> hashs = new HashSet<string>(File.ReadLines("textFile.txt"));
Am wondering if there is any easy way to get a random line from it?
Lets asume the textFile.txt contains 10 lines, i would like to randomize and grab one of those existing lines.
1 Answer