Esempio n. 1
0
        public override bool Equals(object obj)
        {
            if (obj.GetType() != typeof(Weight))
            {
                return(false);
            }

            WeightEqualityComparer comp = new WeightEqualityComparer();

            return(comp.Equals(this, obj as Weight));
        }
Esempio n. 2
0
        public override int GetHashCode()
        {
            WeightEqualityComparer comp = new WeightEqualityComparer();

            return(comp.GetHashCode(this));
        }