I currently have the following expression to update the IsUnread property against all items within my list object.
myList.ForEach(x => x.IsUnread = true);
However, I’d like to apply a condition where the IsUnread property is only updated to true where another property (in the same object) meets a certain condition, in this case, where x.UnreadCount > 0
What’s the cleanest/best approach to achieve this?
I have added brackets for clarity: