public bool Equals(CollectionReferenceWrapper other) { if (ReferenceEquals(other, null)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } if (GetType() != other.GetType()) { return(false); } if (ReferenceEquals(_collectionReference, other._collectionReference)) { return(true); } return(_collectionReference.Equals(other._collectionReference)); }