public int GetHashCode( Object obj )
{
String str = obj as String;
if (str == null)
return obj.GetHashCode();
int iComma = str.IndexOf( ',' );
if (iComma == -1)
iComma = str.Length;
int accumulator = 0;
for (int i = 0; i < iComma; ++i)
{
accumulator = (accumulator << 7) ^ str[i] ^ (accumulator >> 25);
}
return accumulator;
}
}