我有一个巨大的列表,其中包含1000万个项目,我正试图在列表中找到一个特定的值。
这是我的项目
struct reference
{
public double GPST;
public byte cls;
public ushort fn;
public int ret_num;
}
这是我的查询代码
List<reference> ref_pts;
List<reference> result = ref_pts.FindAll(delegate(reference obj) { return obj.GPST == pt.GPST; });
其中pt.GPST是我想在List
中找到的值仅仅是因为尺寸太大,Find方法无效(总是什么都不返回)?