public static int caseInsensitiveHash(string self) { int n = self.Length; int hash = 0; for (int i=0; i<n; i++) { int c = self[i]; if ('A' <= c && c <= 'Z') c |= 0x20; hash = 31*hash + c; } return hash; }
public int GetHashCode(object obj) { return(FanStr.caseInsensitiveHash((string)obj)); }