GetHashCode() public method

public GetHashCode ( Object o ) : int
o Object
return int
Ejemplo n.º 1
0
        public virtual int GetHashCode(object o) {
            string obj = o as string;
            if (obj == null) {
                return o.GetHashCode();
            }

            return BackCompatibleStringComparer.GetHashCode(obj);
        }
Ejemplo n.º 2
0
        public virtual int GetHashCode(object o)
        {
            if (!(o is string obj))
            {
                return(o.GetHashCode());
            }

            return(BackCompatibleStringComparer.GetHashCode(obj));
        }