[Mono-dev] Socket has a dynamic GetHashCode method
Miguel de Icaza
miguel at novell.com
Mon Aug 13 17:34:33 EDT 2007
Hey,
That sounds like a bug to me.
> Socket relies on the underlying operating system handle for its
> HashCode, this creates a problem if later after the underlying resource
> has been disposed but the Socket object is still in use....
>
> For example...
>
> Hashtable ht = new Hashtable();
> Socket s = new Socket(...);
> ht[s] = 5;
> Console.WriteLine(ht.Contains(s)); // true
> s.Close();
> Console.WriteLine(ht.Contains(s)); // false
>
> Is this a bug or an expected result?
>
> Regards,
> David
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
More information about the Mono-devel-list
mailing list