Possible Duplicate:
Good GetHashCode() override for List of Foo objects
I have List
of Objects
, Object has ID, FileName, Status(Enumerator), DateStamp, UserId.
Using Linq
I filter List
using UserId
and send it to Web App.
I need to get some kind of Unique Id
for filtered result and compare it next time to detect changes for current user. If new Object added for current user or property of existing object is changed Unique Id
should be different.
I have tried to use code below to get Hash Code but hash code is different for every myList object even objects and object properties are the same. Any ideas please?
myList= _queueList.GetItems(p => p.User.Id == userId)
.OrderByDescending(p => p.DateStamp)
.ToList();
myList.GetHashCode()