String.GetHashCode() in.NET C# is not guaranteed to be stable. Hash codes for identical strings can differ across .NET implementations and .NET platforms. This implies that two subsequent runs of the same program may return different hash codes. Here is how to overcome this in a good way.