List指定字段赋特定值(非循环) asp.net

 List<Cart> cartd=cartd.Where(p => (p.Id= "123").Length > -1).ToList();

把Id的值都赋值为123

还有循环的方法就不写了

posted @ 2015-12-23 17:33  青春已不再  阅读(1135)  评论(1编辑  收藏  举报