Alternatives
Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
16 Oct 2011Panos Rontogiannis
For reference types, the hash is based on an internal counter that is incremented every time a descendant of System.Object is created. This happens in System.Object's constructor.For value types (structs), the hash is based on the first field. So if the first field is immutable, then you don't...
Assuming you are writing a class (not a struct), you can basically get a fixed random hashcode simply by NOT overriding GetHashCode() but inheriting the implementation from System.Object. Unfortunately the System.Object implementation is not documented in the standard .NET documentation[^] but I...
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.