实现自定义哈希表 [英] implement custom hashtable

查看:71
本文介绍了实现自定义哈希表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


请让我知道如何创建自定义哈希表(例如您需要将重复数据合并到其中)...

Hi,
please let me know how to create a custom hashtable(like you need to incorporate duplicate data into it)...

推荐答案

一个HashTable集合已经阻止了您添加重复的条目.您实际上想做什么?

编辑==============

自定义"以什么方式?额外的功能?如果是这样,只需编写从HashTable派生的新类,然后添加所需的功能.您也可以编写扩展方法,使其具有足够的通用性,可用于您应用程序中的任何HashTable.


A HashTable collection already prevents you from adding duplicate entries. What do you actually want to do?

EDIT ==============

"Custom" in what way? Extra functionality? If so, just write derive a new class from HashTable, and add tyhe functionality you want. You could also just write extension methods to make it generic enough to be used for any HashTable in your app.



这篇关于实现自定义哈希表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆