I have an array of strings (approx 2000), and I'd like to use IEnumerable.GroupBy to group the equal ones.
The problem is though that there are many hash collisions such as "mysteriously" and "well". This is probably due to the fact that GroupBy uses GetHashCode(), which returns an int, which is too small (or the GetHashCode function for the class String hasn't been implemented nicely).
I guess you could try implementing an overridden GetHashCode function or define a custom IEqualityComparer and use a different hashcode, but isn't there any way to compare them directly or differently? I know it'll take much longer, but at a small amount it's acceptable. How could I fix this?