本文整理自网络,侵删。
procedure TForm1.Btnx_1Click(Sender: TObject);var IdexA:Integer; ListA:TStringList;begin try ListA:=TStringList.Create; ListA.Add('banana'); ListA.Add('Apple'); ListA.Add('banana'); ListA.Add('Pear'); ListA.Add('Orange');
ListA.Sorted:=True;
IdexA:=-1; ListA.Find('banana',IdexA); ShowMessageFmt('%D',[IdexA]); finally FreeAndNil(ListA); end;end;
相关阅读 >>
Delphi通过spcomm com口发短信包括pud编码解码
Delphi sysutils.strcopy、sysutils.strecopy
Delphi xe7的android应用取得wi-fi的信息
更多相关阅读请进入《Delphi》频道 >>