Ejemplo n.º 1
0
    // override object.Equals
    public override bool Equals(object obj)
    {
        //
        // See the full list of guidelines at
        //   http://go.microsoft.com/fwlink/?LinkID=85237
        // and also the guidance for operator== at
        //   http://go.microsoft.com/fwlink/?LinkId=85238
        //

        if (obj == null || GetType() != obj.GetType())
        {
            return(false);
        }

        ItemBase other = (ItemBase)obj;

        return(this.GetHashCode() == other.GetHashCode());
    }
Ejemplo n.º 2
0
 public override int GetHashCode()
 {
     return(_type.GetHashCode()
            ^ _document.GetHashCode()
            ^ _itemBase.GetHashCode());
 }