I am studying work on an operation. I repeat a subset of the items from the collection. I am filtering this collection using a Linq query. It basically looks like this:
var filteredItems = items.Where(x => x.PropertyToFilterOn == filterValue);
foreach (var filteredItem in filteredItems)
{
}
If I use Selectinstead Where, I do the same. What is better to use and what is the difference?
source
share