Delphi 泛型容器 TDictionary 的用法 Demo - 免费下载

Windows编程资源 文件大小:80 K

📋 资源详细信息

文件格式
未知
所属分类
上传用户
上传时间
文件大小
80 K
所需积分
2 积分
推荐指数
⭐⭐⭐ (3/5)

💡 温馨提示:本资源由用户 pcplayer 上传分享,仅供学习交流使用。如有侵权,请联系我们删除。

资源简介

Collection of key-value pairs. 

TDictionary represents a generic collection of key-value pairs. 

This class provides a mapping from a collection of keys to a collection of values. When you create a TDictionary object, you can specify various combinations of initial capacity, equality operation, and initial content. 

You can add a key that is associated with a corresponding value with the Add or AddOrSetValue methods. You can remove entries with Remove or Clear, which removes all key-value pairs. Adding or removing a key-value pair and looking up a key are efficient, close to O(1), because keys are hashed. A key must not be nil (though a value may be nil) and there must be an equality comparison operation for keys. 

You can test for the presence or keys and values with the TryGetValue, ContainsKey and ContainsValue methods. 

The Items property lists all Count dictionary entries. You can also set and get values by indexing the Items property. Setting the value this way overwrites any existing value. 

The class TObjectDictionary inherits from TDictionary and provides an automatic mechanism for freeing objects removed from dictionary entries. 

立即下载此资源

提示:下载后请用压缩软件解压,推荐使用 WinRAR 或 7-Zip

资源说明

📥 下载说明

  • 下载需消耗 2积分
  • 24小时内重复下载不扣分
  • 支持断点续传
  • 资源永久有效

📦 使用说明

  • 下载后用解压软件解压
  • 推荐 WinRAR 或 7-Zip
  • 如有密码请查看说明
  • 解压后即可使用

🎁 积分获取

  • 上传资源获得积分
  • 每日签到免费领取
  • 邀请好友注册奖励
  • 查看详情 →

相关标签

点击标签查看更多相关资源:

相关资源推荐