泛型和linq

List<AddressEntity> AddressEntityList = new List<AddressEntity>();
            AddressEntityList.Add(
new AddressEntity { LinkManName = "111111" });
            AddressEntityList.Add(
new AddressEntity { LinkManName = "22222" });
            AddressEntityList.Add(
new AddressEntity { LinkManName = "333333333" });
            AddressEntityList.Add(
new AddressEntity { LinkManName = "444444444" });
            var list 
= AddressEntityList;
            
foreach (AddressEntity temp2 in list.Where(x => x.LinkManName != "22222"))
            {
                Response.Write(temp2.LinkManName 
+ "<br/>");
            }
原文地址:https://www.cnblogs.com/aaa6818162/p/2172286.html