General list and duplicate entries

Using the common TList collection: is there any function that detects duplicate records, or do I need to search all the records and check a single field if it is duplicated or not?

+4
source share
1 answer

A generic TList has a Contains method that can be used to detect duplicates. But you have to call it yourself, because there is no Duplicates property, as for TStringList.

If your data can be compared to a binary comparison, you have nothing more to do. Otherwise, you need to provide a custom mapper.

+8
source

Source: https://habr.com/ru/post/1379882/


All Articles