从TStringList删除重复项

参考文献:http://docwiki.embarcadero.com/Libraries/XE2/en/System.Classes.TStringList.Duplicates


去重一定要加上排序:

 channelList.Sorted := true

 var F: TField;

channelList := TStringList.Create;
channelList.Sorted := True;
channelList.Duplicates := dupIgnore;

try
   dataset.First;
   F := dataset.FieldByName('CHANNEL_INT');
   while not dataset.EOF do
   begin
      channelList.Add(F.AsString);
      dataset.Next;
   end;





联系电话:
020-00000000
联系电话:
020-00000000
联系电话:
020-12345678