判断实体集合里是否有自己要找到数据

SendInfoList是实体类

List<SendInfoList> arrOldList = (List<SendInfoList>)ViewState["SendInfo"] ?? new List<SendInfoList>();

 bool blnExist = arrOldList.Exists(delegate(SendInfoList si)
                {
                    return si.List_Oid == dr["listOid"].ToString();
                });

你可能感兴趣的:(集合)