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

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();
                });

posted @ 2013-03-01 15:49  丁焕轩  阅读(281)  评论(0编辑  收藏  举报