Upon further reflection, I think that using GetHashCode isn't a good idea to
check if I've seen a string before. I think I'll use a MD5 sig instead, so I
don't have to worry about collisions.

Erick

----- Original Message -----
From: "Erick Thompson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 26, 2002 12:44 PM
Subject: [DOTNET] Confirm string GetHashCode reflects string, not object


> I need to check if a particular string has been seen before, so I was
going
> to maintain a list of hashcodes from the strings. However, I want to
confirm
> that the GetHashCode method returns a hashcode based on the string
contents,
> not on the string object. The reason I'm not completely sure is that I'm
not
> totally confident I know how string interning will effect things. Can I
use
> GetHashCode to identify a string?
>
> Thanks,
> Erick
>
> You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.
>

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to