Microsoft.ResourceManagement.ObjectModel.RmAttributeValue.Equals C# (CSharp) Method

Equals() public method

Determines whether the specified T:System.Object is equal to the current T:System.Object.
/// The parameter is null. ///
public Equals ( object obj ) : bool
obj object The to compare with the current .
return bool
        public override bool Equals(object obj)
        {
            RmAttributeValue other = obj as RmAttributeValue;
            if (other == null)
                return false;
            lock (this.attributeValues) {
                lock (other.attributeValues) {
                    if (this.attributeValues.Count != other.attributeValues.Count)
                        return false;
                    this.attributeValues.Sort();
                    other.attributeValues.Sort();
                    for (int i = 0; i < this.attributeValues.Count; i++) {
                        if (this.attributeValues[i].Equals(other.attributeValues[i]) == false)
                            return false;
                    }
                }
            }
            return true;
        }