public override bool Equals(object obj) { if (obj.GetType() == typeof(WebConfig)) { WebConfig compare = (WebConfig)obj; return(compare.KeyValue() == this.KeyValue()); } else { return(base.Equals(obj)); } }