public bool Equals(Listing second) { // If parameter is null return false: if ((object)second == null || JSONQuery == null || second.JSONQuery == null) { return(false); } // Return true if the fields match: return(JSONQuery.Equals(second.JSONQuery)); }