询问者
Hashtable[key]返回值错误

问题
全部回复
-
我怀疑生成hashcode时有问题,出问题的key通常都比较接近,比如 814A0201 和 814A0401.
可以给出你的部分代码吗?尤其是你的Key是如何的字符串?- 已建议为答案 Mike FengModerator 2012年12月12日 11:38
- 取消建议作为答案 Mike FengModerator 2012年12月12日 11:39
-
我怀疑生成hashcode时有问题,出问题的key通常都比较接近,比如 814A0201 和 814A0401.
可以给出你的部分代码吗?尤其是你的Key是如何的字符串?
Mike Feng
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help. -
这不是复现问题的步骤
Mike Feng
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help. -
我的key值是一个4字节byte数组按照16进制转化成的字符串,比如81480201,81480401,814A9501等等。针对hashtable的操作是多线程的,但hashtable的变更查找都加了锁,应该不存在同步的问题。
可以给出你的代码吗?