G
Guest
I am trying to look for change in an instanciated object that contains a
generic list<>. I first get an int value of objA.GetHashCode(). I add a few
objects to the list<> collection in objA I compared the initial value with
the current hash code of objA and they were still the same. OK I thought
maybe if I compare the internal collections I would be more successful, so I
overrode the GetHashCode() method with the hashcode of the List. Still the
values are the same.
1) Am I missing how hashcode should be working?
2) What I'm trying to do is compare collections, so I'm trying to see if
there have been any changes to the collection to determine if I have to
perform an expensive operation. Is there a better way to do this?
TIA
-- Abe
generic list<>. I first get an int value of objA.GetHashCode(). I add a few
objects to the list<> collection in objA I compared the initial value with
the current hash code of objA and they were still the same. OK I thought
maybe if I compare the internal collections I would be more successful, so I
overrode the GetHashCode() method with the hashcode of the List. Still the
values are the same.
1) Am I missing how hashcode should be working?
2) What I'm trying to do is compare collections, so I'm trying to see if
there have been any changes to the collection to determine if I have to
perform an expensive operation. Is there a better way to do this?
TIA
-- Abe