If I read your code correctly, you request a subset of my items, removing those items from the original list, modifying the items in the subset, and putting the changed items in the list. There is no need to go through all this; just change the items in the list.
Linq, however, is for queries, not updates. To update the objects in the collection just use a loop:
foreach(var meeting in meetings) { if(meeting.Users.Any(a => a.Email.Equals(" bot@domain.com "))) meeting.Title = "Bot"; }
or use Linq to pre-filter the list
foreach(var meeting in meetings.Where(x = x.Users.Any(a => a.Email.Equals(" bot@domain.com "))) { meeting.Title = "Bot"; }
Please note that performance probably will not vary significantly between the two
D Stanley
source share