Question

How can I efficiently get a reference to a string in a HashSet<string> if I know the string exists?

i.e.

hashSet.Contains(myString) == true
string stringRef = ???

Thanks!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top