I've made the assumption that the (generic) Dictionary class in .NET uses the GetHashCode() method on its keys to produce hashes. I have two questions leading on from it:
Object has an overridable GetHashCode() method. For a user defined reference type object, will this method produce a hash based on the referenced data? e.g. If I have a class OneString which contains only one String instance variable - will two separate instances of this class with matching strings always produce the same hash code? Or does the GetHashCode() method of OneString need to be overridden to achieve this functionality?
Presumably the hash function implemented in the String class is different to the hash function implemented in a different reference type (e.g. BitmapImage). Are the hash functions implemented in the most common classes publicly available?