in .NET, some strings will have the same hash code

05/25/2009

 Console.WriteLine("0.89265452879139".GetHashCode());
Console.WriteLine("0.280527401380486".GetHashCode());

Do you know what will happen? Have a try:

2060653827

2060653827

these 2 string share the same hash code!

Posted in: C# and .NET| Tags: NET C# Hash Hashcode string GetHashCode Code color class span pre style

Hot Posts

Latest posts

Tags

Others

Sponsors

asp.net interview questions