How to change value of an object using linq

前端 未结 4 1199
半阙折子戏
半阙折子戏 2021-01-23 14:10

I have the following statment that if isdefault is true to this collection i need to set each object isDefault property to false.

  custHead.lstCustomziation.Whe         


        
4条回答
  •  攒了一身酷
    2021-01-23 14:38

    As the Q of LINQ says, LINQ is designed for queries, not updates.

    Just enumerate the LINQ result and apply your update.

提交回复
热议问题