怎么获取TObjectDictionary的其中一项

2025-04-14 18:34:17
推荐回答(1个)
回答1:

var
od:TObjectDictionary;
pe:TObjectDictionary.TPairEnumerator;

............
od:=TObjectDictionary.Create;
pe:=od.GetEnumerator;
while pe.MoveNext do
begin
if (pe.Current.Key = 1) or (pe.Current.Value='123') then
begin
//.......
Break;
end;
end;