CnPack Forum » CnVCL 组件包 » TCnHashTable 怎么遍历


2010-4-26 11:52 传奇迹说
TCnHashTable 怎么遍历

for I := 0 to TList.Count -1 do
  begin
    Obj:=TObject(TList[I]);
    Obj.Free;
  end;

TCnHashTable ???

有个函数
GetKeys
难道要 GetValues(GetKeys(I)) ???
感觉饶圈了啊
有Index 还要 Key....

2010-4-27 14:32 传奇迹说
UP

2010-4-27 20:29 Passion
TCnHashTable目前确实未提供直接遍历的方式,暂时只能用GetValues(GetKeys(I))。
TCnHashMap提供了StartEnum以及GetNext的遍历方式,目前可以使用。

2010-4-28 21:32 传奇迹说
谢谢 大大的回复
自己加还有点麻烦.
代码还没看完.
尝试中...

页: [1]
查看完整版本: TCnHashTable 怎么遍历


Powered by Discuz! Archiver 5.0.0  © 2001-2006 Comsenz Inc.