GetHashCode() public final method

public final GetHashCode ( ) : int
return int
Beispiel #1
0
        protected override int Asn1GetHashCode()
        {
            int num = tagNo.GetHashCode();

            if (obj != null)
            {
                num ^= obj.GetHashCode();
            }
            return(num);
        }
        protected override int Asn1GetHashCode()
        {
            int code = (int)tagNo;

            if (obj != null)
            {
                code ^= obj.GetHashCode();
            }

            return(code);
        }
Beispiel #3
0
        protected override int Asn1GetHashCode()
        {
            int code = tagNo.GetHashCode();

            // TODO: actually this is wrong - the problem is that a re-encoded
            // object may end up with a different hashCode due to implicit
            // tagging. As implicit tagging is ambiguous if a sequence is involved
            // it seems the only correct method for both equals and hashCode is to
            // compare the encodings...
//			code ^= explicitly.GetHashCode();

            if (obj != null)
            {
                code ^= obj.GetHashCode();
            }

            return(code);
        }