我正在将一些东西从Java移植到C#.在Java中hashcode,a ArrayList取决于其中的项目.在C#中,我总是从List... 获得相同的哈希码
hashcode
ArrayList
List
为什么是这样?
对于我的一些对象,哈希码需要不同,因为列表属性中的对象使对象不相等.我希望哈希码对于对象的状态始终是唯一的,并且当对象相等时仅等于另一个哈希码.我错了吗?
c# java collections hashcode gethashcode
c# ×1
collections ×1
gethashcode ×1
hashcode ×1
java ×1