【发布时间】:2009-03-12 15:42:06
【问题描述】:
我有这样的代码:
type
TMyDictionary = TDictionary<int, int>;
var
myDict: TMyDictionary;
k, v: integer;
// code to fill the dictionary
for k in myDict.Keys do
begin
v := myDict.Items[k];
// other stuff
end;
我随机看到 'v := myDict.Items[k];' 上抛出异常其中说 k 无效。
其他人看到了吗?
【问题讨论】:
标签: delphi delphi-2009 tdictionary