泛型字典
// 声明
bplList: TDictionary<string, Integer>;
// 创建
bplList := TDictionary<string, Integer>.Create;
// 往字典里增加一条
h := LoadPackage(bplName);
bplList.Add(bplName, h);
// 查字典
if not bplList.ContainsKey(bplName) then
// 遍历字典
var
i: Integer;
......
for i in bplList.Values do
UnloadPackage(i);
// TryGetValue
p: TPrintTaskThread;
if g_PrintTasks.TryGetValue(frmPos.cdsPrinter.FieldByName('prnName').Text, p) then
p.PrintQueue.Enqueue(OneTimePrint);
本文来自博客园,作者:{咏南中间件},转载请注明原文链接:https://www.cnblogs.com/hnxxcxg/p/5256833.html