Skip to main content

83 posts tagged with "programming"

View All Tags

Nice technique for modifying a subset of a List<T>

· 2 min read

One of my team members sent in the following piece of code, which is clearly intended to update the OrderNumber field for all objects in a List<T> of objects that match a particular productId. I took one look at it and thought "you can't do that!". But then I let the automated test run to see what happens... lo and behold, it worked. And well it should, once I thought about it.

safnet logo