RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBaseArray.Duplicates Property

Specifies whether duplicate items can be added to sorted arrays.

Pascal
property Duplicates: TDuplicates;
C++
__property TDuplicates Duplicates;

Set Duplicates to specify what should happen when an attempt is made to add a duplicate item to a sorted array. The value of Duplicates should be one of the following.

Value 
Meaning 
dupIgnore  
Ignore attempts to add duplicate items to the sorted array.  
dupError  
raise an EArrayError exception when an attempt is made to add duplicate items to the sorted array.  
dupAccept  
Permit duplicate items in the sorted array.  

Set Duplicates before adding any items to the list. Setting Duplicates to dupIgnore or dupError does nothing about duplicate strings that are already in the array.

Note: Duplicates does nothing if the array is not sorted.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!