Create Hash Value on a List?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a List<MyRichObject> with 50 instances in it. Each of the instances has 1 or 2 unique properties, but in a way they are all unique because there is only one at position in the list, etc. I would like to come up with a unique way to "hash" this List so it is unique from all of the other Lists. Is there a smart way to do that in .NET 4? The purpose is to create a kind of "monniker" for the Lists so they can be dumped into a queue and found later based on their unique value. Thanks. 回答1: TL;DR public static int GetSequenceHashCode<T>