【发布时间】:2010-06-02 16:23:42
【问题描述】:
如果我有一个MyBull 类型的对象和一个List<MyBull> orig:
// Just an example
MyBull x = getMeTheObjectWithIdFromDB(9);
orig.add(x);
// Again same? data object
MyBull y = getMeTheObjectWithIdFromDB(9);
那为什么是假的呢?
// This is false, even though all the properties
// of x and y are the same.
orig.Contains<MyBull>(y);
【问题讨论】:
标签: c# list iequalitycomparer