TWideStringList怎么查不到值?
SourceList2:=TWideStringList.Create;
SourceList2.Add('a9');
SourceList2.Add('a8');
i:=0;//不管为几都不管用
if SourceList2.Find('a8',i) then
begin
ShowMessage('dddd2');//死活都查不到a8
end;
怎么才能查到a8呀? 如果把a8换为别的插入,再查,能查到.
[解决办法]
我用的D7中没有TWideStringList
但是我看了TStringList的帮助文档,其中有一点可能很重要
MyList.Sort; [color=#FF0000]{ Find will only work on sorted lists! }[/color]